This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug report...
- To: bryan at terran dot org (B. James Phillippe)
- Subject: Re: bug report...
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Sat, 6 Jun 98 12:11:37 PDT
- Cc: oliva at dcc dot unicamp dot br, egcs at cygnus dot com
> > Yup, AFAI recall, the problem has to do with generating templates of
> > local classes in function templates. Bear in mind, however, that
> > using local classes as template arguments is *not* ANSI/ISO C++
> > ([temp.arg.type]/2 explicitly forbits this), it is an extension
> > provided by gcc and egcs.
>
> I'm sorry, I missed the first part of this thread. Can you provide a small
> snippet of code that illustrates this? You say this is explicitly
> forbidden from ISO C++ and it is supported anyway by egcs; is there a
> warning or compiler flag that prevents someone from inadvertently writing
> this non-portable code?
Ideally, the -ansi flag should warn about use of extensions (that
doesn't mean it currently does in every case) and -ansi -pedantic
should make the compiler really nitpicky about deviations from the
standard. Again, because the language is so big I'm sure egcs has
missed a lot of these things.