c++/6531: attribute error
qzb04471@nifty.ne.jp
qzb04471@nifty.ne.jp
Wed May 1 06:36:00 GMT 2002
>Number: 6531
>Category: c++
>Synopsis: attribute error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed May 01 06:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: qzb04471@nifty.ne.jp
>Release: h8300-elf-g++ (GCC) 3.1 20020429 (prerelease)
>Organization:
>Environment:
RedHat Linux 6.2
>Description:
weaktest.cpp:7: `void bar()' defined both normally and as an alias
weaktest.cpp:7: weak declaration of `void bar()' must precede definition
weaktest.cpp
extern "C" void bar( );
extern "C" void foo( )
{
}
extern "C" void bar( ) __attribute__ ((weak)) __attribute__ ((alias ("foo")));
>How-To-Repeat:
>Fix:
*** decl.c.old Wed May 1 22:26:14 2002
--- decl.c Wed May 1 22:27:53 2002
***************
*** 3505,3511 ****
except for any that we copy here from the old type. */
DECL_ATTRIBUTES (newdecl)
= (*targetm.merge_decl_attributes) (olddecl, newdecl);
- decl_attributes (&newdecl, DECL_ATTRIBUTES (newdecl), 0);
if (TREE_CODE (newdecl) == TEMPLATE_DECL)
{
--- 3505,3510 ----
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list