meissner@DG-RTP.DG.COM (Michael Meissner) (07/20/89)
The following bugs in GCC 1.35 were found in qualifying the Motorola 88000 port. At present, we've had other, higher priority bugs to work on, though if they are not fixed by RMS or others, we will likely attempt to fix them: 1) The preprocessor does not recognize a macro invocation when a comment occurs between the macro name and the open parenthesis. The following program: #define foo(arg) printf("argument = %d\n", arg) main(){ int bar = 1; foo /**/ (bar); return 0; } produces the following with gcc -E: # 1 "macro.c" main(){ int bar = 1; foo (bar); return 0; } 2) An automatic variable with incomplete type, which is made complete by a later declaration is flagged as an error. For example, in the following program, it allows the incomplete type at file scope, but not within the block: struct bar q; struct bar { int field; }; main(){ struct foo p; struct foo { int field; }; } The following error message is printed: struct16.c: In function main: struct16.c:7: storage size of `p' isn't known 3) sizeof(+var) where var is of type unsigned char should be equal to sizeof(int). The following program demonstrates this: main(){ unsigned char c; printf("sizeof(+c) = %d\n", sizeof(+c)); printf("sizeof(-c) = %d\n", sizeof(-c)); printf("sizeof( c) = %d\n", sizeof( c)); return 0; } and produces the following output (on a sun): sizeof(+c) = 1 sizeof(-c) = 4 sizeof( c) = 1 4) String literals that extend over one line, and don't have a backslash ("\") just before the newline do not get a compiler error. The following simple program demonstrates this: char *s = "This string should get an error!";