public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
@ 2013-04-03  7:40 magnus.reftel at gmail dot com
  2013-04-10  8:10 ` [Bug c/56824] " magnus.reftel at gmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2013-04-03  7:40 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56824
           Summary: pragma GCC diagnostic push/pop regression for GCC
                    diagnostic ignored "-Waggregate-return"
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: magnus.reftel@gmail.com


Created attachment 29784
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29784
Simple testcase

If the aggregate-return warning is silenced using

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waggregate-return"

and then, after a line that triggers the warning, the diagnostics are restored
using 

#pragma GCC diagnostic pop

, gcc 4.8 issues an aggregate-return warning. This was not the case in versions
4.6 or 4.7.

With the attached test case, the following is printed:

$ /opt/gcc-4.7/bin/gcc --version
gcc (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /opt/gcc-4.7/bin/gcc -Waggregate-return -c aggregate-return.c
$ /opt/gcc-4.8/bin/gcc --version
gcc (GCC) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /opt/gcc-4.8/bin/gcc -Waggregate-return -c aggregate-return.c
aggregate-return.c: In function ‘main’:
aggregate-return.c:8:13: warning: function call has aggregate value
[-Waggregate-return]
  struct foo f = aggregate_return();
             ^
$

No warning is printed by either version if the "GCC diagnostic pop" is left
out.

This regression does not affect (at least some) other warnings, e.g. the
following test case:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
int main(int argc, char* argv[])
{
        int i;
        return 0;
}
#pragma GCC diagnostic pop

does not print a warning when compiled with "/opt/gcc-4.8/bin/gcc
-Wunused-variable -c unused.c".
>From gcc-bugs-return-419039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 03 07:45:38 2013
Return-Path: <gcc-bugs-return-419039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21832 invoked by alias); 3 Apr 2013 07:45:38 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 21802 invoked by uid 48); 3 Apr 2013 07:45:33 -0000
From: "magnus.reftel at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
Date: Wed, 03 Apr 2013 07:45:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: magnus.reftel at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: Attachment #29784 is obsolete
Message-ID: <bug-56824-4-p4Intfr8YW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56824-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56824-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00184.txt.bz2
Content-length: 576


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV824

Magnus Reftel <magnus.reftel at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29784|0                           |1
        is obsolete|                            |

--- Comment #1 from Magnus Reftel <magnus.reftel at gmail dot com> 2013-04-03 07:45:33 UTC ---
Created attachment 29785
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id)785
Slightly tweaked version of the testcase


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
@ 2013-04-10  8:10 ` magnus.reftel at gmail dot com
  2013-04-10 18:32 ` manu at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2013-04-10  8:10 UTC (permalink / raw)
  To: gcc-bugs


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

Magnus Reftel <magnus.reftel at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #2 from Magnus Reftel <magnus.reftel at gmail dot com> 2013-04-10 08:10:44 UTC ---
The problem also occurs when "-x c++" is specified, so it's not limited to C
only. I can't find any better component for the bug than C, so I'll leave it
here for now. Please move it if there's a better component.


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
  2013-04-10  8:10 ` [Bug c/56824] " magnus.reftel at gmail dot com
@ 2013-04-10 18:32 ` manu at gcc dot gnu.org
  2013-04-12  7:42 ` magnus.reftel at gmail dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2013-04-10 18:32 UTC (permalink / raw)
  To: gcc-bugs


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-04-10
                 CC|                            |manu at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-10 18:32:00 UTC ---
I think the problem is the continue, which moves to the next i--:

Index: diagnostic.c
===================================================================
--- diagnostic.c        (revision 197394)
+++ diagnostic.c        (working copy)
@@ -664,13 +685,13 @@ diagnostic_report_diagnostic (diagnostic
        return false;

       /* This tests for #pragma diagnostic changes.  */
       if (context->n_classification_history > 0)
        {
-         int i;
+         int i = context->n_classification_history - 1;
          /* FIXME: Stupid search.  Optimize later. */
-         for (i = context->n_classification_history - 1; i >= 0; i --)
+         while (i >= 0)
            {
              if (linemap_location_before_p
                  (line_table,
                   context->classification_history[i].location,
                   location))
@@ -686,10 +707,11 @@ diagnostic_report_diagnostic (diagnostic
                      if (diag_class != DK_UNSPECIFIED)
                        diagnostic->kind = diag_class;
                      break;
                    }
                }
+              i--;
            }
        }
       /* This tests if the user provided the appropriate -Werror=foo
         option.  */
       if (diag_class == DK_UNSPECIFIED

but someone would need to test the patch.

But it is a bug.
>From gcc-bugs-return-419724-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 10 18:33:53 2013
Return-Path: <gcc-bugs-return-419724-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3753 invoked by alias); 10 Apr 2013 18:33:53 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 3730 invoked by uid 48); 10 Apr 2013 18:33:50 -0000
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56911] [4.8 Regression] g++.dg/cpp0x/enum25.C:14:19: ICE: in finish_class_member_access_expr, at cp/typeck.c:2673 with -fpic
Date: Wed, 10 Apr 2013 18:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: markus at trippelsdorf dot de
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: CC
Message-ID: <bug-56911-4-GSPWCmKTYH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56911-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56911-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00869.txt.bz2
Content-length: 1556


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV911

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2013-04-10 18:33:50 UTC ---
Hmm, I can confirm the ICE (and it's not the only one in this directory):

 % g++ -c -fpic -std=c++11 gcc/testsuite/g++.dg/cpp0x/*.C 2>&1 | grep internal
gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C:6:23: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C:37:49: internal compiler
error: in gimple_expand_cfg, at cfgexpand.c:4575
gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C:8:36: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C:6:29: internal compiler error:
in convert_nontype_argument, at cp/pt.c:5558
gcc/testsuite/g++.dg/cpp0x/enum25.C:14:19: internal compiler error: in
finish_class_member_access_expr, at cp/typeck.c:2673
gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C:7:12: internal compiler error: in
expand_expr_real_1, at expr.c:9327
gcc/testsuite/g++.dg/cpp0x/range-for23.C:6:20: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/trailing9.C:10:14: internal compiler error: in
cp_parser_late_return_type_opt, at cp/parser.c:16970


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
  2013-04-10  8:10 ` [Bug c/56824] " magnus.reftel at gmail dot com
  2013-04-10 18:32 ` manu at gcc dot gnu.org
@ 2013-04-12  7:42 ` magnus.reftel at gmail dot com
  2013-04-12  9:12 ` manu at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2013-04-12  7:42 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Magnus Reftel <magnus.reftel at gmail dot com> 2013-04-12 07:42:50 UTC ---
Thanks for working on this!

While the change (when applied to 4.8 as released) does make the erroneous
print go away, it makes gcc hang with 100% CPU usage if the "diagnostic
ignored" is commented out, like so:

/* gcc -Waggregate-return -c aggregate-return.c */
struct foo { int i;};
struct foo aggregate_return(void);
#pragma GCC diagnostic push
/*#pragma GCC diagnostic ignored "-Waggregate-return"*/
int main(int argc, char* argv[])
{
        aggregate_return();
        return 0;
}
#pragma GCC diagnostic pop


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (2 preceding siblings ...)
  2013-04-12  7:42 ` magnus.reftel at gmail dot com
@ 2013-04-12  9:12 ` manu at gcc dot gnu.org
  2013-08-08 18:37 ` magnus.reftel at gmail dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2013-04-12  9:12 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-12 09:12:32 UTC ---
Probably the while loop is looping forever in the continue. I don't have time
to investigate this, but I am pretty sure that the bug is somewhere there. If
you use gdb to investigate both testcases, it should be easy to figure out what
the correct behaviour should be.
>From gcc-bugs-return-419909-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 12 09:13:18 2013
Return-Path: <gcc-bugs-return-419909-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17951 invoked by alias); 12 Apr 2013 09:13:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17916 invoked by uid 48); 12 Apr 2013 09:13:15 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56920] [4.8 Regression] another static initialization of an array miscompiled
Date: Fri, 12 Apr 2013 09:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56920-4-H9a7rJ4NAJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56920-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56920-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01054.txt.bz2
Content-length: 1641


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV920

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 09:13:15 UTC ---
Author: jakub
Date: Fri Apr 12 08:18:59 2013
New Revision: 197846

URL: http://gcc.gnu.org/viewcvs?rev\x197846&root=gcc&view=rev
Log:
    PR tree-optimization/56918
    PR tree-optimization/56920
    * fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...)
    instead of op1 - op2.  Pass 2 * TYPE_PRECISION (type) as second
    argument to rshift method.  For 2 * HOST_BITS_PER_WIDE_INT precision
    use wide_mul_with_sign method.

    * gcc.dg/vect/pr56918.c: New test.
    * gcc.dg/vect/pr56920.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr56918.c
    trunk/gcc/testsuite/gcc.dg/vect/pr56920.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog

Author: jakub
Date: Fri Apr 12 08:38:29 2013
New Revision: 197847

URL: http://gcc.gnu.org/viewcvs?rev\x197847&root=gcc&view=rev
Log:
    PR tree-optimization/56918
    PR tree-optimization/56920
    * fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...)
    instead of op1 - op2.  Pass 2 * TYPE_PRECISION (type) as second
    argument to rshift method.

    * gcc.dg/vect/pr56918.c: New test.
    * gcc.dg/vect/pr56920.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr56918.c
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr56920.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/fold-const.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (3 preceding siblings ...)
  2013-04-12  9:12 ` manu at gcc dot gnu.org
@ 2013-08-08 18:37 ` magnus.reftel at gmail dot com
  2013-08-10 16:14 ` mikpe at it dot uu.se
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2013-08-08 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

Magnus Reftel <magnus.reftel at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.3
      Known to fail|                            |4.8.1, 4.9.0

--- Comment #6 from Magnus Reftel <magnus.reftel at gmail dot com> ---
Re-tested with 4.8.1 and MacPorts experimental gcc49 version 4.9-20130728_1.
Both fail. 4.7.3 works.


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

* [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (4 preceding siblings ...)
  2013-08-08 18:37 ` magnus.reftel at gmail dot com
@ 2013-08-10 16:14 ` mikpe at it dot uu.se
  2013-11-19  9:46 ` [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with " rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mikpe at it dot uu.se @ 2013-08-10 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dehao at gcc dot gnu.org,
                   |                            |mikpe at it dot uu.se

--- Comment #7 from Mikael Pettersson <mikpe at it dot uu.se> ---
Started with Dehao Chen's "Combine location with block using block_locations"
patch in r191494.


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

* [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (5 preceding siblings ...)
  2013-08-10 16:14 ` mikpe at it dot uu.se
@ 2013-11-19  9:46 ` rguenth at gcc dot gnu.org
  2013-11-22 10:45 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.3
            Summary|[4.8 regression] pragma GCC |[4.8/4.9 regression] pragma
                   |diagnostic push/pop fail    |GCC diagnostic push/pop
                   |with GCC diagnostic ignored |fail with GCC diagnostic
                   |"-Waggregate-return"        |ignored
                   |                            |"-Waggregate-return"


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

* [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (6 preceding siblings ...)
  2013-11-19  9:46 ` [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with " rguenth at gcc dot gnu.org
@ 2013-11-22 10:45 ` rguenth at gcc dot gnu.org
  2014-02-05 14:15 ` [Bug preprocessor/56824] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-22 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug preprocessor/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (7 preceding siblings ...)
  2013-11-22 10:45 ` rguenth at gcc dot gnu.org
@ 2014-02-05 14:15 ` jakub at gcc dot gnu.org
  2014-02-07  7:03 ` magnus.reftel at gmail dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-05 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32050
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32050&action=edit
gcc49-pr56824.patch

Untested fix.


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

* [Bug preprocessor/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (8 preceding siblings ...)
  2014-02-05 14:15 ` [Bug preprocessor/56824] " jakub at gcc dot gnu.org
@ 2014-02-07  7:03 ` magnus.reftel at gmail dot com
  2014-02-07 16:43 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2014-02-07  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Magnus Reftel <magnus.reftel at gmail dot com> ---
Thanks for the patch! I applied it on top of
53c3c39b96df9c6a6368bf0d6acfd28a7af3cb63 and tested.

Without the patch, the error was still printed when compiling the testcase.
With the patch, the error was not printed. Removing the "#pragma GCC diagnostic
ignored" made the error print again, as expected. The fix is thus working as it
should on the testcase. I no longer have access to the code base where the
problem was discovered, so I guess this verification will have to do.

I'm not sure what the criteria for updating the status field are, though, so I
leave it at "ASSIGNED".


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

* [Bug preprocessor/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (9 preceding siblings ...)
  2014-02-07  7:03 ` magnus.reftel at gmail dot com
@ 2014-02-07 16:43 ` jakub at gcc dot gnu.org
  2014-02-08  0:10 ` [Bug preprocessor/56824] [4.8 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-07 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Feb  7 16:42:24 2014
New Revision: 207606

URL: http://gcc.gnu.org/viewcvs?rev=207606&root=gcc&view=rev
Log:
    PR preprocessor/56824
    * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line,
    linemap_get_expansion_filename, linemap_location_in_system_header_p,
    linemap_location_from_macro_expansion_p,
    linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point,
    linemap_macro_loc_to_exp_point, linemap_expand_location): Fix
    formatting.
    (linemap_compare_locations): Look through adhoc locations for both
    l0 and l1.

    * gcc.dg/pr56824.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr56824.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/line-map.c


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

* [Bug preprocessor/56824] [4.8 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (10 preceding siblings ...)
  2014-02-07 16:43 ` jakub at gcc dot gnu.org
@ 2014-02-08  0:10 ` jakub at gcc dot gnu.org
  2014-02-10 15:56 ` magnus.reftel at gmail dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-08  0:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.9.0
            Summary|[4.8/4.9 regression] pragma |[4.8 regression] pragma GCC
                   |GCC diagnostic push/pop     |diagnostic push/pop fail
                   |fail with GCC diagnostic    |with GCC diagnostic ignored
                   |ignored                     |"-Waggregate-return"
                   |"-Waggregate-return"        |
      Known to fail|4.9.0                       |

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.


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

* [Bug preprocessor/56824] [4.8 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (11 preceding siblings ...)
  2014-02-08  0:10 ` [Bug preprocessor/56824] [4.8 " jakub at gcc dot gnu.org
@ 2014-02-10 15:56 ` magnus.reftel at gmail dot com
  2014-03-06  7:58 ` jakub at gcc dot gnu.org
  2014-03-06  8:27 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: magnus.reftel at gmail dot com @ 2014-02-10 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Magnus Reftel <magnus.reftel at gmail dot com> ---
Works fine on trunk (tested version 96c7d4b1727c5f9ddcbb02fb69f727a0f2f3572e).


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

* [Bug preprocessor/56824] [4.8 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (12 preceding siblings ...)
  2014-02-10 15:56 ` magnus.reftel at gmail dot com
@ 2014-03-06  7:58 ` jakub at gcc dot gnu.org
  2014-03-06  8:27 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06  7:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar  6 07:58:16 2014
New Revision: 208365

URL: http://gcc.gnu.org/viewcvs?rev=208365&root=gcc&view=rev
Log:
    Backport from mainline
    2014-02-07  Jakub Jelinek  <jakub@redhat.com>

    PR preprocessor/56824
    * line-map.c (linemap_compare_locations): Look through adhoc locations
    for both l0 and l1.

    * gcc.dg/pr56824.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr56824.c
Modified:
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/libcpp/ChangeLog
    branches/gcc-4_8-branch/libcpp/line-map.c


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

* [Bug preprocessor/56824] [4.8 regression] pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return"
  2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
                   ` (13 preceding siblings ...)
  2014-03-06  7:58 ` jakub at gcc dot gnu.org
@ 2014-03-06  8:27 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.8.3
         Resolution|---                         |FIXED

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Hopefully fixed now.


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

end of thread, other threads:[~2014-03-06  8:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-03  7:40 [Bug c/56824] New: pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return" magnus.reftel at gmail dot com
2013-04-10  8:10 ` [Bug c/56824] " magnus.reftel at gmail dot com
2013-04-10 18:32 ` manu at gcc dot gnu.org
2013-04-12  7:42 ` magnus.reftel at gmail dot com
2013-04-12  9:12 ` manu at gcc dot gnu.org
2013-08-08 18:37 ` magnus.reftel at gmail dot com
2013-08-10 16:14 ` mikpe at it dot uu.se
2013-11-19  9:46 ` [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with " rguenth at gcc dot gnu.org
2013-11-22 10:45 ` rguenth at gcc dot gnu.org
2014-02-05 14:15 ` [Bug preprocessor/56824] " jakub at gcc dot gnu.org
2014-02-07  7:03 ` magnus.reftel at gmail dot com
2014-02-07 16:43 ` jakub at gcc dot gnu.org
2014-02-08  0:10 ` [Bug preprocessor/56824] [4.8 " jakub at gcc dot gnu.org
2014-02-10 15:56 ` magnus.reftel at gmail dot com
2014-03-06  7:58 ` jakub at gcc dot gnu.org
2014-03-06  8:27 ` jakub at gcc dot gnu.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).