Author Topic: compilation on new gcc 4.1  (Read 3533 times)

Offline AlexPaes

  • Single posting newcomer
  • *
  • Posts: 4
compilation on new gcc 4.1
« 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: [Select]
class myclass
{
        int myclass::run();
};

it wants:

Code: [Select]
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

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: compilation on new gcc 4.1
« Reply #1 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. :)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: compilation on new gcc 4.1
« Reply #2 on: March 14, 2006, 02:53:07 pm »
May be you would like to give a look at here.

Best wishes,
Michael

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: compilation on new gcc 4.1
« Reply #3 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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: compilation on new gcc 4.1
« Reply #4 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: compilation on new gcc 4.1
« Reply #5 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).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."