public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6930: different behavior in 3.1 and 3.0.4
@ 2002-06-04 13:46 thomas
0 siblings, 0 replies; only message in thread
From: thomas @ 2002-06-04 13:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: thomas
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
>Number: 6930
>Category: c++
>Synopsis: different behavior in 3.1 and 3.0.4
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Jun 04 13:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Thomas Koeller
>Release: 3.1
>Organization:
>Environment:
System: Linux sarkovy.koeller.dyndns.org 2.4.18 #3 Sam Mär 23 01:29:53 CET 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/thomas/src/gnu/gcc-3.1/configure --prefix=/opt/gcc-3.1 --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-system-zlib --enable-threads=posix
>Description:
The attached example program is accepted by gcc-3.0.4, but is rejected
by gcc-3.1.
>How-To-Repeat:
Compile this example program:
---
extern "C" void func(void);
extern "C" void func(void) __attribute__((weak, alias("__func")));
void __func(void){}
---
These are the results:
bash-2.05a$ /opt/gcc-v3/bin/g++ -V 3.0.4 -fsyntax-only testprog.cxx
bash-2.05a$ /opt/gcc-v3/bin/g++ -V 3.1 -fsyntax-only testprog.cxx
testprog.cxx:2: `void func()' defined both normally and as an alias
testprog.cxx:2: weak declaration of `void func()' must precede definition
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-04 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-04 13:46 c++/6930: different behavior in 3.1 and 3.0.4 thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).