public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
@ 2015-05-04 14:13 evangelos at foutrelis dot com
  2015-05-04 14:34 ` [Bug c++/66007] " trippels at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: evangelos at foutrelis dot com @ 2015-05-04 14:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

            Bug ID: 66007
           Summary: [5 Regression] Narrowing conversion inside { } results
                    in all zero elements in C++11 mode
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evangelos at foutrelis dot com
  Target Milestone: ---

Created attachment 35453
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35453&action=edit
Different narrowing behavior between GCC 4.9 and GCC 5

This is related to PR c++/65801 which allowed -Wno-narrowing to be used to
silence narrowing errors in C++11 mode.

Compiling something like "int foo[] = { 1, 0xFFFFFFFF, 3 };" with "-std=c++11
-Wno-error=narrowing" will initialize foo to {0, 0, 0}, whereas GCC 4.9 would
initialize it to {1, -1, 3}. (Attached is the assembler code generated by both
GCC versions.)

(This change in behavior causes at least one crash in Chromium; when using the
search box on the settings page, the tab will crash.)


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

* [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
@ 2015-05-04 14:34 ` trippels at gcc dot gnu.org
  2015-05-04 14:50 ` trippels at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-04 14:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I cannot reproduce this on today's 5 branch:

markus@x4 tmp % echo 'int foo[] = { 1, 0xFFFFFFFF, 3 };' | g++ -S -x c++ - -o -
-std=c++11 -Wno-narrowing
        .file   ""
        .globl  foo
        .data
        .align 8
        .type   foo, @object
        .size   foo, 12
foo:
        .long   1
        .long   -1
        .long   3
        .ident  "GCC: (GNU) 5.1.1"
        .section        .note.GNU-stack,"",@progbits


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

* [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
  2015-05-04 14:34 ` [Bug c++/66007] " trippels at gcc dot gnu.org
@ 2015-05-04 14:50 ` trippels at gcc dot gnu.org
  2015-05-04 16:10 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-04 14:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Closing as fixed.


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

* [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
  2015-05-04 14:34 ` [Bug c++/66007] " trippels at gcc dot gnu.org
  2015-05-04 14:50 ` trippels at gcc dot gnu.org
@ 2015-05-04 16:10 ` jakub at gcc dot gnu.org
  2015-05-04 16:22 ` evangelos at foutrelis dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-05-04 16:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In particular, fixed with PR65858 r222699 (trunk) and r222700 (5 branch)
commits.


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

* [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (2 preceding siblings ...)
  2015-05-04 16:10 ` jakub at gcc dot gnu.org
@ 2015-05-04 16:22 ` evangelos at foutrelis dot com
  2015-05-04 16:31 ` [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing trippels at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: evangelos at foutrelis dot com @ 2015-05-04 16:22 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3535 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

Evangelos Foutras <evangelos at foutrelis dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |---

--- Comment #4 from Evangelos Foutras <evangelos at foutrelis dot com> ---
I'm afraid it's not fully fixed yet; using -Wno-error=narrowing will still
initialize all array elements to zero:

$ echo 'int foo[] = { 1, 0xFFFFFFFF, 3 };' | g++ -S -x c++ - -o - -std=c++11
-Wno-error=narrowing 
        .file   ""
<stdin>:1:32: warning: narrowing conversion of ‘4294967295u’ from ‘unsigned
int’ to ‘int’ inside { } [-Wnarrowing]
        .globl  foo
        .bss
        .align 8
        .type   foo, @object
        .size   foo, 12
foo:
        .zero   12
        .ident  "GCC: (GNU) 5.1.1 20150504"
        .section        .note.GNU-stack,"",@progbits
>From gcc-bugs-return-485429-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 04 16:25:50 2015
Return-Path: <gcc-bugs-return-485429-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30333 invoked by alias); 4 May 2015 16:25:49 -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 30285 invoked by uid 48); 4 May 2015 16:25:46 -0000
From: "evangelos at foutrelis dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66007] [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode
Date: Mon, 04 May 2015 16:25: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-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: evangelos at foutrelis dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created
Message-ID: <bug-66007-4-dpPYevBAPf@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00269.txt.bz2
Content-length: 602

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf007

Evangelos Foutras <evangelos at foutrelis dot com> changed:

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

--- Comment #5 from Evangelos Foutras <evangelos at foutrelis dot com> ---
Created attachment 35458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id5458&actioníit
Different narrowing behavior between GCC 4.9 and GCC 5 (with
-Wno-error=narrowing)


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (3 preceding siblings ...)
  2015-05-04 16:22 ` evangelos at foutrelis dot com
@ 2015-05-04 16:31 ` trippels at gcc dot gnu.org
  2015-05-04 16:33 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-04 16:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-04
            Summary|[5 Regression] Narrowing    |[5/6 Regression] Narrowing
                   |conversion inside { }       |conversion inside { }
                   |results in all zero         |results in all zero
                   |elements in C++11 mode      |elements in C++11 mode with
                   |                            |-Wno-error=narrowing
     Ever confirmed|0                           |1

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Ouch.


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (4 preceding siblings ...)
  2015-05-04 16:31 ` [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing trippels at gcc dot gnu.org
@ 2015-05-04 16:33 ` paolo.carlini at oracle dot com
  2015-05-04 16:34 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-04 16:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Unfortunately, I'm afraid it's a real issue. Note the test has
-Wno-error=narrowing, not -Wno-narrowing. Thus the pedwarn at typeck2.c:962
returns true and ok remains false while we only emitted a warning and the
compilation goes on. In other terms we have a variant of c++/65858. It may work
to simply set ok = true unconditionally, after all we do the same for the
previous pedwarn and in this case we are simply forcing -pedantic-errors,
something that can happen for any other pedwarn as a normal user provided
switch.


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (5 preceding siblings ...)
  2015-05-04 16:33 ` paolo.carlini at oracle dot com
@ 2015-05-04 16:34 ` paolo.carlini at oracle dot com
  2015-05-04 16:40 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-04 16:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Index: typeck2.c
===================================================================
--- typeck2.c   (revision 222767)
+++ typeck2.c   (working copy)
@@ -959,10 +959,10 @@ check_narrowing (tree type, tree init, tsubst_flag
       else if (complain & tf_error)
        {
          global_dc->pedantic_errors = 1;
-         if (!pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
-                       "narrowing conversion of %qE from %qT to %qT "
-                       "inside { }", init, ftype, type))
-           ok = true;
+         pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
+                  "narrowing conversion of %qE from %qT to %qT "
+                  "inside { }", init, ftype, type);
+         ok = true;
          global_dc->pedantic_errors = flag_pedantic_errors;
        }
     }


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (6 preceding siblings ...)
  2015-05-04 16:34 ` paolo.carlini at oracle dot com
@ 2015-05-04 16:40 ` jakub at gcc dot gnu.org
  2015-05-04 17:46 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-05-04 16:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #8)
> Index: typeck2.c
> ===================================================================
> --- typeck2.c	(revision 222767)
> +++ typeck2.c	(working copy)
> @@ -959,10 +959,10 @@ check_narrowing (tree type, tree init, tsubst_flag
>        else if (complain & tf_error)
>  	{
>  	  global_dc->pedantic_errors = 1;
> -	  if (!pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
> -			"narrowing conversion of %qE from %qT to %qT "
> -			"inside { }", init, ftype, type))
> -	    ok = true;
> +	  pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
> +		   "narrowing conversion of %qE from %qT to %qT "
> +		   "inside { }", init, ftype, type);
> +	  ok = true;
>  	  global_dc->pedantic_errors = flag_pedantic_errors;
>  	}
>      }

Another possibility would be to check if the pedwarn increased errorcount, so
something like:
          int savederrorcount = errorcount;
          pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
                   "narrowing conversion of %qE from %qT to %qT "
                   "inside { }", init, ftype, type);
          if (errorcount != savederrorcount)
            ok = true;
>From gcc-bugs-return-485434-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 04 17:10:03 2015
Return-Path: <gcc-bugs-return-485434-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 104775 invoked by alias); 4 May 2015 17:10:03 -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 104721 invoked by uid 48); 4 May 2015 17:09:59 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
Date: Mon, 04 May 2015 17:10: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-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc assigned_to
Message-ID: <bug-66007-4-a7i16YeDvM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66007-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00274.txt.bz2
Content-length: 1080

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf007

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|paolo.carlini at oracle dot com    |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Right Jakub. To my taste, fiddling directly with those counters isn't that
nice, but I know we do it in a few other places. In any case this code is
rather hackish anyway, we try to do something we don't do anywhere else,
effectively suppressing an hard error via -Wno-*. Also, as I already said, I
was thinking that normally elsewhere in the code, we do not handle pedwarns as
errors, we don't consider that -pedantic-errors may be in effect (in the
pedwarn right before too). What can I say, maybe we can ask Jason, which
solution he prefers in principle? In the meanwhile I do some testing.


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (7 preceding siblings ...)
  2015-05-04 16:40 ` jakub at gcc dot gnu.org
@ 2015-05-04 17:46 ` paolo.carlini at oracle dot com
  2015-05-04 20:59 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-04 17:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Turns out we want to check by hand errorcount at least to avoid additional
overflow diagnostic (eg, cpp0x/enum29.C)


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (9 preceding siblings ...)
  2015-05-04 20:59 ` paolo at gcc dot gnu.org
@ 2015-05-04 20:59 ` paolo at gcc dot gnu.org
  2015-05-04 21:23 ` paolo.carlini at oracle dot com
  11 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-05-04 20:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #13 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon May  4 20:59:03 2015
New Revision: 222779

URL: https://gcc.gnu.org/viewcvs?rev=222779&root=gcc&view=rev
Log:
/cp
2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
            Jakub Jelinek  <jakub@redhat.com>

        PR c++/66007
        * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
        result in an actual error.

/testsuite
2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
            Jakub Jelinek  <jakub@redhat.com>

        PR c++/66007
        * g++.dg/cpp0x/Wnarrowing4.C: New.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/Wnarrowing4.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/typeck2.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (8 preceding siblings ...)
  2015-05-04 17:46 ` paolo.carlini at oracle dot com
@ 2015-05-04 20:59 ` paolo at gcc dot gnu.org
  2015-05-04 20:59 ` paolo at gcc dot gnu.org
  2015-05-04 21:23 ` paolo.carlini at oracle dot com
  11 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-05-04 20:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

--- Comment #12 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon May  4 20:58:33 2015
New Revision: 222778

URL: https://gcc.gnu.org/viewcvs?rev=222778&root=gcc&view=rev
Log:
/cp
2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
            Jakub Jelinek  <jakub@redhat.com>

        PR c++/66007
        * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
        result in an actual error.

/testsuite
2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
            Jakub Jelinek  <jakub@redhat.com>

        PR c++/66007
        * g++.dg/cpp0x/Wnarrowing4.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/Wnarrowing4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing
  2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
                   ` (10 preceding siblings ...)
  2015-05-04 20:59 ` paolo at gcc dot gnu.org
@ 2015-05-04 21:23 ` paolo.carlini at oracle dot com
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-04 21:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #14 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


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

end of thread, other threads:[~2015-05-04 21:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 14:13 [Bug c++/66007] New: [5 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode evangelos at foutrelis dot com
2015-05-04 14:34 ` [Bug c++/66007] " trippels at gcc dot gnu.org
2015-05-04 14:50 ` trippels at gcc dot gnu.org
2015-05-04 16:10 ` jakub at gcc dot gnu.org
2015-05-04 16:22 ` evangelos at foutrelis dot com
2015-05-04 16:31 ` [Bug c++/66007] [5/6 Regression] Narrowing conversion inside { } results in all zero elements in C++11 mode with -Wno-error=narrowing trippels at gcc dot gnu.org
2015-05-04 16:33 ` paolo.carlini at oracle dot com
2015-05-04 16:34 ` paolo.carlini at oracle dot com
2015-05-04 16:40 ` jakub at gcc dot gnu.org
2015-05-04 17:46 ` paolo.carlini at oracle dot com
2015-05-04 20:59 ` paolo at gcc dot gnu.org
2015-05-04 20:59 ` paolo at gcc dot gnu.org
2015-05-04 21:23 ` paolo.carlini at oracle dot com

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