public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7313: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
@ 2002-09-14 13:01 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-09-14 13:01 UTC (permalink / raw)
To: fleming, gcc-bugs, gcc-prs, juberti, mikest, nobody, sethjschroeder
Synopsis: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
State-Changed-From-To: open->feedback
State-Changed-By: nathan
State-Changed-When: Sat Sep 14 13:01:43 2002
State-Changed-Why:
the zip file is unzippable
nathan@uha:267>unzip 7313.ii.gz
Archive: 7313.ii.gz
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of 7313.ii.gz or
7313.ii.gz.zip, and cannot find 7313.ii.gz.ZIP, period.
nathan@uha:268>file 7313.ii.gz
7313.ii.gz: gzip compressed data, deflated, original filename, `mismatch.ii', last modified: Mon Jul 15 15:34:37 2002, max compression, os: Unix
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7313
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/7313: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
@ 2002-09-14 14:26 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-09-14 14:26 UTC (permalink / raw)
To: fleming, gcc-bugs, gcc-prs, juberti, mikest, nobody, sethjschroeder
Synopsis: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
State-Changed-From-To: feedback->analyzed
State-Changed-By: nathan
State-Changed-When: Sat Sep 14 14:26:40 2002
State-Changed-Why:
doh! gunzip. Confirmed, the code is illformed
by 7.5/5
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7313
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/7313: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
@ 2002-07-15 7:46 sethjschroeder
0 siblings, 0 replies; 3+ messages in thread
From: sethjschroeder @ 2002-07-15 7:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: juberti, fleming, mikest
>Number: 7313
>Category: c++
>Synopsis: variable declared but not defined with "C" linkage placed in enclosing namespace at link time
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Mon Jul 15 07:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Seth Schroeder
>Release: Apple Computer, Inc. GCC version 1040, based on gcc version 3.1 20020105 (experimental)
>Organization:
>Environment:
seths% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1040, based on gcc version 3.1 20020105 (experimental)
seths% uname -a
Darwin localhost 6.0 Darwin Kernel Version 6.0: Wed May 1 01:04:14 PDT 2002; root:xnu/xnu-282.obj~4/RELEASE_PPC Power Macintosh powerpc
OS X 10.2 beta build. Problem also occurs on release candidate build of OS.
>Description:
command line: g++ -Wall -c mismatch.cpp
compiler messages: (none)
The problem is that at link time, variables declared with "C" linkage but not defined with it are placed in the enclosing namespace, instead of the global namespace.
This does not happen with g++ 2.96 (stock rh 7.3 flavor) or HP-UX 11.22's aCC. Nor does it happen with functions.
>How-To-Repeat:
see attachment
>Fix:
Place all explicitly-namespaced variables declared with "C" linkage in global namespace at link time.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="mismatch.ii.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mismatch.ii.gz"
H4sICH3dMj0CA21pc21hdGNoLmlpAG2MQQrCMBBF9znFJ93ookLXUTeeJI0jDnQmIU2hWHp3I1hQ
6F++z3sNOljhUXwJz1NIyZrmg879xENpWa8bCFHE6x0DK23wX1QvNCYfCI8YzWJQR3OhrLA3C9aC
3me3z1+HozOr2Y18TVzQdu6HVAcLMpWppuqFtRbecOI1NdIAAAA=
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-14 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-14 13:01 c++/7313: variable declared but not defined with "C" linkage placed in enclosing namespace at link time nathan
-- strict thread matches above, loose matches on Subject: below --
2002-09-14 14:26 nathan
2002-07-15 7:46 sethjschroeder
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).