News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

compilation on new gcc 4.1

Started by AlexPaes, March 14, 2006, 02:38:29 PM

Previous topic - Next topic

AlexPaes

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:

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


it wants:

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

takeshimiya

If you know a list about the pedantic/iso things that GCC4 complains over GCC3, please post it, might be good to know. :)

Michael

May be you would like to give a look at here.

Best wishes,
Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

takeshimiya

I've always wondered what those thousand "warning: type attributes are honored only at type definition" means, when compiling wxWidgets.

thomas

It means exactly what it says. It is due to using __declspec in the wrong place. Welcome to the wonderful world of macros.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

thomas

Quote from: AlexPaes on March 14, 2006, 02:38:29 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).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."