This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Default constructor and uninitialized const


> Peter Seiderer wrote:
> 
> ># /opt/gcc-3.4.2/bin/g++ -Wall -ansi default_constructor.cpp
> >default_constructor.cpp:17: error: uninitialized const `a2'
> >  
> >
> :) :) what *intel* calls "-strict_ansi", of course.
> 
> Paolo.
> 

Thanks, reproducable with intel:

# icc -strict_ansi default_constructor.cpp
default_constructor.cpp(17): warning #854: const variable "a2" requires an
initializer -- class "A2" has no explicitly declared default constructor
  static const A2 a2;
                    ^

Any hints to relevant documentation?

Peter

-- 
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail


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