Article View: gnu.gcc.bug
Article #484Bugs uncovered in the 88000 port
From: Michael Meissner
Date: Wed, 19 Jul 1989 20:45
Date: Wed, 19 Jul 1989 20:45
76 lines
2120 bytes
2120 bytes
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!";
Technical Details
Message-ID:
<8907192045.AA04114@tiktok.dg.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!DG-RTP.DG.COM!meissnerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!DG-RTP.DG.COM!meissner From: meissner@DG-RTP.DG.COM (Michael Meissner) Newsgroups: gnu.gcc.bug Subject: Bugs uncovered in the 88000 port Message-ID: <8907192045.AA04114@tiktok.dg.com> Date: 19 Jul 89 20:45:10 GMT Sender: pearlman@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 76