This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: possibly incorrect error message (gcc 2.7.2/linux)


Julian Hall wrote:
> 
> 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).
your code is being compiled as c++, because of the .cc suffix and lack of
command line option overriding that. `typename' is a reserved c++ keyword.

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
        I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]