Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: AlexPaes on March 14, 2006, 02:38:29 pm

Title: compilation on new gcc 4.1
Post by: AlexPaes on March 14, 2006, 02:38:29 pm
Hi to everyone,

I just wanted to inform the people developing Code::Blocks, in case they aren't aware of this yet, that gcc 4.1 by default complains about using the class name in class methods declaration like:

Code
class myclass
{
        int myclass::run();
};

it wants:

Code
class myclass
{
        int run();
};

Anyway i know this can be worked around by turning off the "extra qualification" but as i see no particular advantage in having class methods declared like this i decided to post and inform as people keep having these mistakes when building codeblocks with gcc41

cheers, and keep up the good work
Title: Re: compilation on new gcc 4.1
Post by: takeshimiya on March 14, 2006, 02:42:23 pm
If you know a list about the pedantic/iso things that GCC4 complains over GCC3, please post it, might be good to know. :)
Title: Re: compilation on new gcc 4.1
Post by: Michael on March 14, 2006, 02:53:07 pm
May be you would like to give a look at here (http://forums.codeblocks.org/index.php?topic=2217.0).

Best wishes,
Michael
Title: Re: compilation on new gcc 4.1
Post by: takeshimiya on March 14, 2006, 03:02:15 pm
I've always wondered what those thousand "warning: type attributes are honored only at type definition" means, when compiling wxWidgets.
Title: Re: compilation on new gcc 4.1
Post by: thomas on March 14, 2006, 04:24:32 pm
It means exactly what it says. It is due to using __declspec in the wrong place. Welcome to the wonderful world of macros.
Title: Re: compilation on new gcc 4.1
Post by: thomas on March 14, 2006, 04:28:32 pm
I just wanted to inform the people developing Code::Blocks, in case they aren't aware of this yet, that gcc 4.1 by default complains about using the class name in class methods declaration like:
Thanks for pointing out, this is a known gcc pedantism, gcc 3.4.5 does it, too :)  (at least with -Wall, don't know about default).