system's gcc bug?
Rene Ladan
r.c.ladan at student.tue.nl
Wed Mar 31 02:18:36 PST 2004
Hi,
I'm getting runtime errors when executing the following program and
declaring one of the arrays:
----------------
#include <stdio.h>
int main(void) {
/* int a[4] = { 0, 1, 2, 3 }; enable this line to get a buserror */
int *i;
/* int b[4] = { 0, 1, 2, 3 }; enable this line to get a segfault */
for (*i = 0; *i < 4; (*i)++)
printf("%p %i\n", i, *i);
return(0);
}
----------------
I'm running system's gcc on 5.2.1-release:
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.3.3 [FreeBSD] 20031106
I have not yet mailed to the gcc developers, as the system gcc is
somewhat patched. Neither have I filed a PR yet.
Rene
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040331/1c952752/attachment-0001.bin
More information about the freebsd-current
mailing list