This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
section attribute - bug or feature?
- From: Petr Sebor <petr at scssoft dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Jun 2002 21:22:58 +0200
- Subject: section attribute - bug or feature?
- Organization: SCS Software
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