c++/6682: many types undefined makes a compiler bug
Giovanni Bajo
giovannibajo@libero.it
Thu May 1 16:35:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6682
Very interesting testcase for error reporting ICEs, but it needed some heavy
cleanup.
A first regression is the following:
-------------------------------------------
void func(void*, INVALID (*child_func)(INVALID));
-------------------------------------------
regr1.cpp:2: `child_func' was not declared in this scope
regr1.cpp:2: `INVALID' was not declared in this scope
regr1.cpp:2: type specifier omitted for parameter `
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
But it's a regression on the (now closed) 3.2 branch only, 3.3 and 3.4 does
not have this problem. So it can be ignored as already fixed.
Then, we have this:
-------------------------------------------
typedef struct _foo foo;
void bar(void) INVALID;
struct _foo
{};
-------------------------------------------
pr6682.cpp: In function `void bar()':
pr6682.cpp:3: error: syntax error before `;' token
pr6682.cpp:3: error: ISO C++ forbids declaration of `INVALID' with no type
pr6682.cpp:6: error: declaration of `struct _foo' in `void bar()' which does
not enclose `::'
pr6682.cpp:6: internal compiler error: Segmentation fault
Please submit a full bug report,
which is a regression on the 3.3 branch only, with respect to 3.2 and
previous. 3.4 does not have this problem.
So I will keep this bug report open as a 3.3 regression, ice-on-illegal.
Giovanni Bajo
More information about the Gcc-bugs
mailing list