This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40476] SEG fault on redefinition of struct error
- From: "tor_rustad at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2009 14:47:24 -0000
- Subject: [Bug c/40476] SEG fault on redefinition of struct error
- References: <bug-40476-17847@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from tor_rustad at hotmail dot com 2009-06-18 14:47 -------
(In reply to comment #1)
> Works for me.
>
> gcc-4.2 --version
> gcc-4.2 (GCC) 4.2.4 (Debian 4.2.4-6)
The seg fault happened with
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
unintentionally I left out two semicolons in the test case, the corrected test
case is:
$ cat test.c
struct R
{
char c;
};
struct R
{
struct R r;
};
int main(void)
{
struct R r;
return 0;
}
$ gcc test.c
test.c:7: error: redefinition of ?struct R?
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
$ gcc -std=c89 test.c
test.c:7: error: redefinition of ?struct R?
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
$ gcc -std=c99 test.c
test.c:7: error: redefinition of ?struct R?
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
--
tor_rustad at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tor_rustad at hotmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40476