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]

Re: Peculiar functionality


On May 18, 1999, "Stephen Lindholm" <lind0753@umn.edu> wrote:

> 1)  The new operators "or" "and" "not" (etc), described on Stroustrup C++PL
> 3rd ed. p. 829 appear to not exist in egcs, or to be turned off by default.

Indeed.  Use -foperator-names or -ansi.  I think it is not enabled by
default for fear of breaking header-files that still use them.  Maybe
it's time to turn them on by default, now that we're moving to more
strict ISO C++.

> 2)  egcs complains when I use arrays of references.  If this is bad style,
> please explain why.

Not only bad style, it's ill-formed.  ISO C++ forbids arrays of
references, because references are not objects (in the Standard
sense).

> 3)  I can't make class-local constants!

You can, but you have to declare them as static, otherwise you won't
be allowed to initialize them at the point of declaration.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists


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