This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Error
- From: Ian Lance Taylor <iant at google dot com>
- To: fimer <yuanhao12 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 26 Dec 2008 20:56:05 -0800
- Subject: Re: GCC Error
- References: <20528286.post@talk.nabble.com> <m3ljvirinw.fsf@google.com> <21172193.post@talk.nabble.com>
fimer <yuanhao12@gmail.com> writes:
>> That said, the most likely problem is that the code is doing something
>> like this:
>>
>> class C { void C::fn(); }
>>
>> That is invalid C++ syntax, but older versions of gcc--before gcc 3.4,
>> I think--used to accept it. The "C::" must be omitted.
>>
>> Ian
>>
>>
>
>
> If it is, can this also be resolved by adding any option to compile command?
As far as I know there is no option for this. This code was always
invalid according to C++, and as far as I know it was never intended
for g++ to accept it. That is, it was a bug, and the bug is now
fixed.
Ian