Article 1610 of comp.sys.apple2.programmer:
Newsgroups: comp.sys.apple2.programmer
Path: caen!uwm.edu!cs.utexas.edu!uunet!zib-berlin.de!informatik.tu-muenchen.de!behrenss
From: behrenss@Informatik.TU-Muenchen.DE (Soenke Behrens)
Subject: ORCA/C 2.01 bugs, version 1.2
Sender: news@Informatik.TU-Muenchen.DE (USENET Newssystem)
Organization: Technische Universitaet Muenchen, Germany
Date: Sun, 12 Dec 1993 12:27:47 GMT
Message-ID: <1993Dec12.122747.29256@Informatik.TU-Muenchen.DE>
Lines: 140
================== Bugs in ORCA/C 2.0.1, v.1.2 =======================
Preface
=======
These are bugs in ORCA/C 2.0.1 found by various users. All of
these have already been reported to The Byteworks.
The purpose of this document is to help you when programming the
GS, so that by knowing about problems in your tools, you can work
around them. It is NOT intended to help you bashing ORCA/C on grounds
of it having bugs. Every product has bugs, and a C compiler is no
exception.
Note that only a few of the bugs listed here could be entitled
"hardcore", the rest ranges from "annoying" to "mildly amusing".
--> Support those that support you!! <--
Changes since v.1.0
===================
- Added the bug about mode "rb+". Thanks to the guy whose name I forgot :)
who found it.
- Added a section for deviations from the ISO/C standard.
Changes since v.1.1
===================
- Added the bug regarding .sym files and #endif. I think I will have to
organize things better ... I was positive I had written down the name
of the guy who reported it this time. *Sigh*. I feel sheepish.
The List
========
- If you declare a function as 'void foo(unsigned);' and define it
as 'void foo(unsigned int bar)', you get a 'type conflict' error
message.
- Do NOT mix old-style function definitions with prototyped
declarations. Passed parameters will be garbled if you attempt that.
(I.e. don't do 'void foo (int *);', 'void foo (bar) int *bar;')
- 'sscanf("foo","%d",&bar);' returns 1 as if it had correctly converted
an integer.
- 'sscanf("R A 3 0 4","%*[^PR]%c %c %d %d %d",&l,&q,&k,&m,&n),' returns
5. It should return 0, as '%*[^PR]' was not satisfied.
- Defining a variable 'unsigned bar', assigning a value > INT_MAX to it,
and casting that to (unsigned long) gives incorrect results. To work
around this, define the variable as 'unsigned int bar' instead.
- 'printf("%d != %d\n",0x8000U << 1, 1U << 16);' should print '0 != 0',
it does print '0 != 1'. Bit-shifts are obviously sometimes handled
incorrectly.
- Open a file with mode "rb+". Read a character, step back one char
with fseek, write one character, and close the file. You will notice
that the file has not changed. The changes are written out correctly
if you write more than just one character, though.
- If the last statement that goes into creating the .sym file is #endif,
and the .sym file already exist, ORCA/C will complain about "no matching
#if for this #endif". Example:
#ifdef APPLE2
#include