From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7433 invoked by alias); 11 Jun 2002 14:06:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7362 invoked by uid 71); 11 Jun 2002 14:06:01 -0000 Resent-Date: 11 Jun 2002 14:06:01 -0000 Resent-Message-ID: <20020611140601.7360.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, petr@scssoft.com Received: (qmail 5717 invoked by uid 61); 11 Jun 2002 14:04:06 -0000 Message-Id: <20020611140406.5709.qmail@sources.redhat.com> Date: Tue, 11 Jun 2002 07:06:00 -0000 From: petr@scssoft.com Reply-To: petr@scssoft.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6992: GCC-3.1.x - attribute 'section' broken for constructors X-SW-Source: 2002-06/txt/msg00240.txt.bz2 List-Id: >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: