c++/10767: some code with 'typeof' does not compile

Alexander.Zviagine@cern.ch Alexander.Zviagine@cern.ch
Tue May 13 11:35:00 GMT 2003


>Number:         10767
>Category:       c++
>Synopsis:       some code with 'typeof' does not compile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue May 13 09:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alexander.Zviagine@cern.ch
>Release:        gcc-3.2
>Organization:
>Environment:

>Description:
I am not sure that this is a bug, but I though that the code maight work.
// -- CUT HERE --
class A {public: typedef int B;} a;
typeof(a) aa;       // ok
A::B b;             // ok
typeof(a)::B bb;    // does not work

$ g++ -c typeof.cc
typeof.cc:4: syntax error before `;' token
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list