This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

section attribute - bug or feature?


Hello,

I really apologize if I just can't read the fine manual, but
I am having trouble with a construct that used to work some
time before:

class a {
  public:
    __attribute__((section("whatever"))) a();
    __attribute__((section("whatever"))) void b(void);
};

this is how it used to work until gcc-3.0.4 or so...
after upgrading to gcc-3.1 (debian package), the
code chunk mentioned before fails to compile with this complaint:

warning: 'section' attribute ignored
declaration does not declare anything
parse error before ')' token

however, this works:

class a {
  public:
    a() __attribute__((section("whatever")));
    __attribute__((section("whatever"))) void b(void);
};

tried to upgrade to : GCC-3.1.1 20020606 (Debian prerelease)
with the same effect... so I am having a question: do I have
to learn how to read the manual (since I am not sure whether
the former construct is allowed after reading it) or is this
a gcc bug?

Regards,
Petr Sebor

PS : please CC me as I am not subscribed to the list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]