public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: sethjschroeder@aol.com To: gcc-gnats@gcc.gnu.org Cc: juberti@aol.com, fleming@apple.com, mikest@apple.com Subject: c++/7313: variable declared but not defined with "C" linkage placed in enclosing namespace at link time Date: Mon, 15 Jul 2002 07:46:00 -0000 [thread overview] Message-ID: <20020715144038.8129.qmail@sources.redhat.com> (raw) >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=
next reply other threads:[~2002-07-15 14:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-15 7:46 sethjschroeder [this message] 2002-09-14 13:01 nathan 2002-09-14 14:26 nathan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020715144038.8129.qmail@sources.redhat.com \ --to=sethjschroeder@aol.com \ --cc=fleming@apple.com \ --cc=gcc-gnats@gcc.gnu.org \ --cc=juberti@aol.com \ --cc=mikest@apple.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).