This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/6711: usage of typeof() generates internal error
- From: marco at technoboredom dot net
- To: gcc-gnats at gcc dot gnu dot org
- Date: 17 May 2002 23:05:34 -0000
- Subject: c++/6711: usage of typeof() generates internal error
- Reply-to: marco at technoboredom dot net
>Number: 6711
>Category: c++
>Synopsis: usage of typeof() generates internal error
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 17 16:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: marco@technoboredom.net
>Release: unknown-1.0
>Organization:
>Environment:
$ uname -a
CYGWIN_NT-5.0 OBLOMOW 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown
Administrator@OBLOMOW /cygdrive/c/tmp/New Folder
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.1/specs
Configured with: ../gcc-3.1/configure --program-suffix=-3.1 --enable-shared --enable-threads=win32 --enable-languages=c,
c++,objc,f77 --enable-win32-registry : (reconfigured) ../gcc-3.1/configure --prefix=/usr --program-suffix=-3.1 --enable-
shared --enable-threads=win32 --enable-languages=c,c++,objc,f77 --enable-win32-registry
Thread model: win32
gcc version 3.1
>Description:
GCC doesn't recognize expressions of the form typeof()::type, and under certain circumstances it produces a request to submit a bug report.
>How-To-Repeat:
If the attachment 'b.cc' is compiled with:
gcc -DA -c b.cc
then this message:
<quote>
b.cc: In function `int main()':
b.cc:10: `template<class _Category, class _Tp, class _Distance, class _Pointer,
class _Reference> struct std::iterator' as declarator
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
<quote>
If the attachment 'b.cc' is compiled with:
gcc -DB -c b.cc
then this message:
b.cc: In function `int main()':
b.cc:20: parse error before `=' token
b.cc:20: `it' undeclared (first use this function)
b.cc:20: (Each undeclared identifier is reported only once for each function it
appears in.)
</quote>
is generated. In the -DB case the "using namespace std;" statement is removed.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="b.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="b.cc"
I2lmIEENCg0KI2luY2x1ZGUgPGxpc3Q+DQoNCnVzaW5nIG5hbWVzcGFjZSBzdGQ7IA0KDQppbnQg
bWFpbiggKQ0Kew0KICBzdGQ6Omxpc3Q8aW50PiBsOyANCiAgZm9yICh0eXBlb2YobCk6Oml0ZXJh
dG9yIGl0PWwuYmVnaW4oKTtpdCE9bC5iZWdpbigpO2l0KyspOyAgDQp9DQoNCiNlbGlmIEINCg0K
I2luY2x1ZGUgPGxpc3Q+DQoNCmludCBtYWluKCApDQp7DQogIHN0ZDo6bGlzdDxpbnQ+IGw7IA0K
ICBmb3IgKHR5cGVvZihsKTo6aXRlcmF0b3IgaXQ9bC5iZWdpbigpO2l0IT1sLmJlZ2luKCk7aXQr
Kyk7ICANCn0NCg0KI2Vsc2UgDQojZXJyb3IgImNvbXBpbGUgd2l0aCAtREEgb3IgLURCIg0KI2Vu
ZGlmDQo=