This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/6992: GCC-3.1.x - attribute 'section' broken for constructors
- From: petr at scssoft dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 11 Jun 2002 14:04:06 -0000
- Subject: c++/6992: GCC-3.1.x - attribute 'section' broken for constructors
- Reply-to: petr at scssoft dot com
>Number: 6992
>Category: c++
>Synopsis: GCC-3.1.x - attribute 'section' broken for constructors
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Jun 11 07:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: petr@scssoft.com
>Release: gcc-3.1.x
>Organization:
>Environment:
debian linux x86
>Description:
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 (only for the class constructor):
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);
};
shouldn't be theese two constructor declarations equivalent?
a() __attribute__((section("whatever")));
__attribute__((section("whatever"))) a();
>How-To-Repeat:
try to compile this:
class a {
public:
__attribute__((section("whatever"))) a();
};
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: