possibly incorrect error message (gcc 2.7.2/linux)

Julian Hall jules@acris.demon.co.uk
Mon Oct 4 07:20:00 GMT 1999


The following definition causes an error message on gcc 2.7.2 when compiled
with 'gcc -c -ansi test.cc'.  All other compilers I have access to (Borland
C++ 4.5, LCC 3.1) accept the code.  The identifier/keyword 'typename' is
not mentioned anywhere in the GCC 2.7.2 'info' documentation (except in
narrative text where it is used to refer to the name of a type).

struct classdef {      
    char * typename;   
};                     
                       
The error message is:

test.cc:2: parse error before `typename'




More information about the Gcc-bugs mailing list