public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27227]  New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
@ 2006-04-20 19:36 pinskia at gcc dot gnu dot org
  2006-04-22 20:28 ` [Bug c++/27227] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-20 19:36 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
namespace x {
extern "C" const int y;
};
using x::y;
extern "C" int const y=0;
-------

The testcase is orginally from Alex Rosenberg on the IRC channel, modified to
make it valid code so that the linkage specifications match.

This used to work before 4.0.0


-- 
           Summary: [4.0/4.1/4.2 Regression] rejects valid code with some
                    extern "C"
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
@ 2006-04-22 20:28 ` pinskia at gcc dot gnu dot org
  2006-05-26 15:28 ` bangerth at dealii dot org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-22 20:28 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
  2006-04-22 20:28 ` [Bug c++/27227] " pinskia at gcc dot gnu dot org
@ 2006-05-26 15:28 ` bangerth at dealii dot org
  2006-06-04 18:28 ` mmitchel at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: bangerth at dealii dot org @ 2006-05-26 15:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bangerth at dealii dot org  2006-05-26 15:28 -------
Confirmed.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.2 4.1.0
      Known to work|                            |3.3.5
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-26 15:28:24
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
  2006-04-22 20:28 ` [Bug c++/27227] " pinskia at gcc dot gnu dot org
  2006-05-26 15:28 ` bangerth at dealii dot org
@ 2006-06-04 18:28 ` mmitchel at gcc dot gnu dot org
  2006-06-14  4:19 ` mmitchel at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 18:28 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-06-04 18:28 ` mmitchel at gcc dot gnu dot org
@ 2006-06-14  4:19 ` mmitchel at gcc dot gnu dot org
  2006-06-14 17:48 ` mmitchel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14  4:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1/4.2 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-06-14  4:19 ` mmitchel at gcc dot gnu dot org
@ 2006-06-14 17:48 ` mmitchel at gcc dot gnu dot org
  2006-06-14 17:51 ` [Bug c++/27227] [4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14 17:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-06-14 17:44 -------
Subject: Bug 27227

Author: mmitchel
Date: Wed Jun 14 17:44:36 2006
New Revision: 114647

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114647
Log:
        PR c++/27227
        * decl.c (decls_match): Allow an extern "C" variable declarations
        from different namespaces to match.
        (duplicate_decls): Disallow redeclaring a variable with a
        different linkage specification.
        PR c++/27227
        * g++.dg/lookup/linkage1.C: New test.
        * g++.dg/lookup/linkage2.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/lookup/linkage1.C
    trunk/gcc/testsuite/g++.dg/lookup/linkage2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-06-14 17:48 ` mmitchel at gcc dot gnu dot org
@ 2006-06-14 17:51 ` mmitchel at gcc dot gnu dot org
  2006-06-14 19:17 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14 17:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-06-14 17:50 -------
Fixed in 4.2.0.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1 Regression] rejects
                   |rejects valid code with some|valid code with some extern
                   |extern "C"                  |"C"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0/4.1 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-06-14 17:51 ` [Bug c++/27227] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-06-14 19:17 ` mmitchel at gcc dot gnu dot org
  2006-06-14 19:19 ` [Bug c++/27227] [4.0 " mmitchel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14 19:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-06-14 19:17 -------
Subject: Bug 27227

Author: mmitchel
Date: Wed Jun 14 19:17:19 2006
New Revision: 114652

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114652
Log:
        PR c++/27227
        * decl.c (decls_match): Allow an extern "C" variable declarations
        from different namespaces to match.
        (duplicate_decls): Disallow redeclaring a variable with a
        different linkage specification.
        PR c++/27227
        * g++.dg/lookup/linkage1.C: New test.
        * g++.dg/lookup/linkage2.C: Likewise.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/lookup/linkage1.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/lookup/linkage2.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-06-14 19:17 ` mmitchel at gcc dot gnu dot org
@ 2006-06-14 19:19 ` mmitchel at gcc dot gnu dot org
  2006-06-15 16:19 ` sje at cup dot hp dot com
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14 19:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-06-14 19:17 -------
Fixedin 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 Regression] rejects|[4.0 Regression] rejects
                   |valid code with some extern |valid code with some extern
                   |"C"                         |"C"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-06-14 19:19 ` [Bug c++/27227] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-06-15 16:19 ` sje at cup dot hp dot com
  2006-06-15 16:50 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp dot com @ 2006-06-15 16:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sje at cup dot hp dot com  2006-06-15 16:14 -------
Could I get clarification if the following error is a desired effect of this
change.  Prior to this, the included program gave no error.  I believe the
change was caused by this patch.  This is causing a problem with the HP-UX
definition of errno, but it we want this error, I can fixheaders the header
file in question.

e.c:1: error: previous declaration of 'int i' with 'C++' linkage
e.c:4: error: conflicts with new declaration with 'C' linkage

[hpclear8] $ cat e.c

extern int i;

extern "C" {
        extern int i;
}


-- 

sje at cup dot hp dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sje at cup dot hp dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-06-15 16:19 ` sje at cup dot hp dot com
@ 2006-06-15 16:50 ` pinskia at gcc dot gnu dot org
  2006-06-30 18:03 ` ben at decadentplace dot org dot uk
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-15 16:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-06-15 16:19 -------
(In reply to comment #6)
> e.c:1: error: previous declaration of 'int i' with 'C++' linkage
> e.c:4: error: conflicts with new declaration with 'C' linkage
> 
> extern int i;
> extern "C" {
>         extern int i;
> }

Not this is a confirmation that the above is invalid code but EDG also errors
out.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-06-15 16:50 ` pinskia at gcc dot gnu dot org
@ 2006-06-30 18:03 ` ben at decadentplace dot org dot uk
  2006-07-15 10:18 ` tbm at cyrius dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ben at decadentplace dot org dot uk @ 2006-06-30 18:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ben at decadentplace dot org dot uk  2006-06-30 17:48 -------
The standard says in 7.5/5: "If two declarations of the same function or object
specify different linkage-specifications [...] the program is ill-formed if the
declarations appear in the same translation unit [...]". That is why code like
that in comment 6 is now rejected.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-06-30 18:03 ` ben at decadentplace dot org dot uk
@ 2006-07-15 10:18 ` tbm at cyrius dot com
  2006-07-15 10:28 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: tbm at cyrius dot com @ 2006-07-15 10:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from tbm at cyrius dot com  2006-07-15 10:18 -------
(In reply to comment #6)
> Could I get clarification if the following error is a desired effect of this
> change.  Prior to this, the included program gave no error.  I believe the
> change was caused by this patch. 
> 
> e.c:1: error: previous declaration of 'int i' with 'C++' linkage
> e.c:4: error: conflicts with new declaration with 'C' linkage
> 
> [hpclear8] $ cat e.c
> 
> extern int i;
> 
> extern "C" {
>         extern int i;
> }

So apparently this is invalid code.  However, I feel very strongly that a point
release of GCC should *not* introduce a new error - Mark, please modify the
patch applied to the 4.1 branch in a way to allow this code.


-- 

tbm at cyrius dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2006-07-15 10:18 ` tbm at cyrius dot com
@ 2006-07-15 10:28 ` pinskia at gcc dot gnu dot org
  2006-07-15 10:41 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-15 10:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-07-15 10:27 -------
(In reply to comment #9)
> So apparently this is invalid code.  However, I feel very strongly that a point
> release of GCC should *not* introduce a new error - Mark, please modify the
> patch applied to the 4.1 branch in a way to allow this code.

Why?  It is better to reject invalid code even than keeping backwards
compatiblity.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2006-07-15 10:28 ` pinskia at gcc dot gnu dot org
@ 2006-07-15 10:41 ` pinskia at gcc dot gnu dot org
  2006-07-15 10:42 ` tbm at cyrius dot com
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-15 10:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-07-15 10:41 -------
Hmm, actually the defect report about the code in comment #6 is still active so
I agree that we should not reject it on the release branch. 
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#563


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2006-07-15 10:41 ` pinskia at gcc dot gnu dot org
@ 2006-07-15 10:42 ` tbm at cyrius dot com
  2006-07-15 10:48 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: tbm at cyrius dot com @ 2006-07-15 10:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from tbm at cyrius dot com  2006-07-15 10:42 -------
(In reply to comment #10)
> Why?  It is better to reject invalid code even than keeping backwards
> compatiblity.

No, it's not - not in a minor point release.  Users expect that a minor point
release is backwards compatible.

Upgrading from 4.1.1 to 4.1.2 should be painless, i.e. fix bugs only.  But now
we suddenly have 13 package build failures in Debian.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2006-07-15 10:42 ` tbm at cyrius dot com
@ 2006-07-15 10:48 ` pinskia at gcc dot gnu dot org
  2006-07-15 10:58 ` tbm at cyrius dot com
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-15 10:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2006-07-15 10:48 -------
(In reply to comment #12)
> Upgrading from 4.1.1 to 4.1.2 should be painless, i.e. fix bugs only.  But now
> we suddenly have 13 package build failures in Debian.
It is a bug fix, just not what normal people think about bug fix.  If there was
not a defect report still open about this case, I actually would say this was a
bug fix but this one is a bit weird as the defect report was not resolved yet. 
I have a feeling Mark should not have changed the behavior until it was
resolved as there was no comments on the defect report either.  Anyways I filed
PR 28389 about the defect report so that people know that the standard is
ambiguous and that maybe we can get the behavior back to the orginal


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2006-07-15 10:48 ` pinskia at gcc dot gnu dot org
@ 2006-07-15 10:58 ` tbm at cyrius dot com
  2006-07-19  6:00 ` mark at codesourcery dot com
  2007-02-03 16:52 ` gdr at gcc dot gnu dot org
  18 siblings, 0 replies; 20+ messages in thread
From: tbm at cyrius dot com @ 2006-07-15 10:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from tbm at cyrius dot com  2006-07-15 10:58 -------
(In reply to comment #13)
> > Upgrading from 4.1.1 to 4.1.2 should be painless, i.e. fix bugs only.  But now
> > we suddenly have 13 package build failures in Debian.
> It is a bug fix, just not what normal people think about bug fix.

That's right.  Not what normal people, i.e. users of GCC, see as a bug fix.  If
code is invalid but it works, please leave it alone in a stable point release. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2006-07-15 10:58 ` tbm at cyrius dot com
@ 2006-07-19  6:00 ` mark at codesourcery dot com
  2007-02-03 16:52 ` gdr at gcc dot gnu dot org
  18 siblings, 0 replies; 20+ messages in thread
From: mark at codesourcery dot com @ 2006-07-19  6:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from mark at codesourcery dot com  2006-07-19 06:00 -------
Subject: Re:  [4.0 Regression] rejects valid code with some
 extern "C"

tbm at cyrius dot com wrote:

> So apparently this is invalid code.  However, I feel very strongly that a point
> release of GCC should *not* introduce a new error - Mark, please modify the
> patch applied to the 4.1 branch in a way to allow this code.

As a matter of policy, we don't intentionally introduce errors on
release branches.  However, it is far too strong a statement to say that
we should never introduce an error.  In many such cases, the new error
is either indicative of a situation in which the compiler was behaving
randomly (i.e., in which the generated code made no sense) or the new
error is a side-effect of some other important change.

In this case, we were rejecting valid code.  We no longer reject valid
code; instead we reject invalid code.  (Andrew's comment about the DR
being open is accurate, but the DR will almost certainly be resolved so
as to make this code invalid.)

If you want to find a way to accept the invalid code on the release
branch, that's your privilege.  I consider it a better use of my (very
limited) time to fix places where the compiler fails to conform to the
standard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C"
  2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2006-07-19  6:00 ` mark at codesourcery dot com
@ 2007-02-03 16:52 ` gdr at gcc dot gnu dot org
  18 siblings, 0 replies; 20+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 16:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from gdr at gcc dot gnu dot org  2007-02-03 16:52 -------
Fixed in GCC-4.1.2


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-02-03 16:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 19:36 [Bug c++/27227] New: [4.0/4.1/4.2 Regression] rejects valid code with some extern "C" pinskia at gcc dot gnu dot org
2006-04-22 20:28 ` [Bug c++/27227] " pinskia at gcc dot gnu dot org
2006-05-26 15:28 ` bangerth at dealii dot org
2006-06-04 18:28 ` mmitchel at gcc dot gnu dot org
2006-06-14  4:19 ` mmitchel at gcc dot gnu dot org
2006-06-14 17:48 ` mmitchel at gcc dot gnu dot org
2006-06-14 17:51 ` [Bug c++/27227] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-06-14 19:17 ` mmitchel at gcc dot gnu dot org
2006-06-14 19:19 ` [Bug c++/27227] [4.0 " mmitchel at gcc dot gnu dot org
2006-06-15 16:19 ` sje at cup dot hp dot com
2006-06-15 16:50 ` pinskia at gcc dot gnu dot org
2006-06-30 18:03 ` ben at decadentplace dot org dot uk
2006-07-15 10:18 ` tbm at cyrius dot com
2006-07-15 10:28 ` pinskia at gcc dot gnu dot org
2006-07-15 10:41 ` pinskia at gcc dot gnu dot org
2006-07-15 10:42 ` tbm at cyrius dot com
2006-07-15 10:48 ` pinskia at gcc dot gnu dot org
2006-07-15 10:58 ` tbm at cyrius dot com
2006-07-19  6:00 ` mark at codesourcery dot com
2007-02-03 16:52 ` gdr at gcc dot gnu dot org

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).