This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is that code valid ?
- To: Olivier Galibert <Olivier dot Galibert at mines dot u-nancy dot fr>
- Subject: Re: Is that code valid ?
- From: "Lassi A. Tuura" <Lassi dot Tuura at cern dot ch>
- Date: Tue, 11 Nov 1997 10:39:06 +0100
- CC: egcs at cygnus dot com
- Organization: CERN, European Laboratory for Particle Physics
- References: <19971111065132.56342@renaissance.loria.fr>
Olivier Galibert wrote:
> kftabdlg.cpp:549: parse error before `;'
> Line 549 is "return(QDate::QDate());"
>
> Changing that line to "return QDate();" works perfectly though.
That is valid code, since the class name is found in its own scope.
Hence, one should be able to repeat `QDate::' arbitrary many times. In
other words, assuming the proper declarations, the following is
perfectly valid, albeit weird code:
return (QDate::QDate::QDate::QDate ());
Cheers,
//lat
--
Lassi.Tuura@cern.ch There's no sunrise without a night