Is this code valid under g++

LLeweLLyn Reese llewelly@lifesupport.shutdown.com
Fri Mar 21 01:23:00 GMT 2003


Oscar Fuentes <ofv@wanadoo.es> writes:

> LLeweLLyn Reese <llewelly@lifesupport.shutdown.com> writes:
> 
> >>         while (*item == ' ' || *item == '   ')
> >
> > No. '   ' is a multicharacter char literal. It is not part of standard
> >     C++,
> 
> That was what I thought, but it's ok, although its value is
> implementation-defined. See 2.13.2/1

Thank you. I had thought it was undefined, but now I see it isn't.
Next question - where are the gcc docs for multicharacter char literals?

> 
> > not portable in general, and AFAIK a gcc extension. If you
> >     mean a tab, use \t.
> 
> [snip]
> 
> -- 
> Oscar



More information about the Gcc-help mailing list