[Bug c++/31775] static object mangling conflicts with extern object

2020-10-07 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/31775] static object mangling conflicts with extern object

2020-10-06 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 Nathan Sidwell changed: What|Removed |Added Status|RESOLVED|ASSIGNED CC|

[Bug c++/31775] static object mangling conflicts with extern object

2010-01-06 Thread pinskia at gcc dot gnu dot org
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775

[Bug c++/31775] static object mangling conflicts with extern object

2008-02-29 Thread pinskia at gmail dot com
--- Comment #9 from pinskia at gmail dot com 2008-03-01 04:19 --- Subject: Re: static object mangling conflicts with extern object Sent from my iPhone On Feb 29, 2008, at 20:05, "geoffk at geoffk dot org" <[EMAIL PROTECTED] > wrote: > > > --- Comment #8 from geoffk at geoffk do

Re: [Bug c++/31775] static object mangling conflicts with extern object

2008-02-29 Thread Andrew Pinski
Sent from my iPhone On Feb 29, 2008, at 20:05, "geoffk at geoffk dot org" <[EMAIL PROTECTED] > wrote: --- Comment #8 from geoffk at geoffk dot org 2008-03-01 04:05 It should be mangled, because there are still three different things named 'i' declared in this program, and so

[Bug c++/31775] static object mangling conflicts with extern object

2008-02-29 Thread geoffk at geoffk dot org
--- Comment #8 from geoffk at geoffk dot org 2008-03-01 04:05 --- Subject: Re: static object mangling conflicts with extern object On 29/02/2008, at 5:57 AM, mueller at gcc dot gnu dot org wrote: > extern "C" void abort(); > extern "C" { static int i; } > int *p = &i; > int main() >

[Bug c++/31775] static object mangling conflicts with extern object

2008-02-29 Thread mueller at gcc dot gnu dot org
--- Comment #7 from mueller at gcc dot gnu dot org 2008-02-29 13:57 --- how about extern "C" void abort(); extern "C" { static int i; } int *p = &i; int main() { int i; { extern int i; i = 1; *p = 2; if (i == 2) abort (); } return 0; } in this case, the

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-05 Thread geoffk at gcc dot gnu dot org
--- Comment #6 from geoffk at gcc dot gnu dot org 2007-05-06 01:27 --- That should do it. -- geoffk at gcc dot gnu dot org changed: What|Removed |Added Status

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-05 Thread geoffk at gcc dot gnu dot org
--- Comment #5 from geoffk at gcc dot gnu dot org 2007-05-06 01:01 --- Subject: Bug 31775 Author: geoffk Date: Sun May 6 00:01:36 2007 New Revision: 124467 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124467 Log: Index: libiberty/ChangeLog 2007-05-04 Geoffrey Keating <[EMAI

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-01 Thread geoffk at gcc dot gnu dot org
--- Comment #4 from geoffk at gcc dot gnu dot org 2007-05-02 01:46 --- I just happen to have a patch which fixes this. -- geoffk at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-01 Thread geoffk at gcc dot gnu dot org
--- Comment #3 from geoffk at gcc dot gnu dot org 2007-05-02 00:54 --- You would add a translation unit that says int i; or similar. It's not "main::i", it's "::i", because of [basic.link] paragraph 7: When a block scope declaration of an entity with linkage is not found to refer to

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-01 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2007-05-01 20:44 --- How do you define main"::"i? That is, how'd you make the testcase work from a second translation unit if it would fail now? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775

[Bug c++/31775] static object mangling conflicts with extern object

2007-05-01 Thread geoffk at gcc dot gnu dot org
--- Comment #1 from geoffk at gcc dot gnu dot org 2007-05-01 19:56 --- This testcase is the same principle, but might use a different code path in the compiler: extern "C" void abort(); extern int *p; int main() { extern int i; i = 1; *p = 2; if (i == 2) abort (); return