public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51064] New: False Positive for -Wparentheses
@ 2011-11-09 15:00 sascha.cunz at gmx dot net
  2011-11-09 18:51 ` [Bug c++/51064] " manu at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sascha.cunz at gmx dot net @ 2011-11-09 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51064
           Summary: False Positive for -Wparentheses
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sascha.cunz@gmx.net


Using GCC 4.6.2 ("Gentoo 4.6.2 p1.0, pie-0.45") the code

[1] template< int i, int j = ( ( i+7 ) >> 3 ) > class foo{};
[2] typedef foo< 10 > bar;

produces a false positive -Wparentheses (Suggest parentheses around '+' inside
'>>') warning on line 2.


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

* [Bug c++/51064] False Positive for -Wparentheses
  2011-11-09 15:00 [Bug c++/51064] New: False Positive for -Wparentheses sascha.cunz at gmx dot net
@ 2011-11-09 18:51 ` manu at gcc dot gnu.org
  2012-01-04 12:15 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2011-11-09 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-09
                 CC|                            |manu at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-11-09 18:35:44 UTC ---
Also in trunk (r180166). Not in clang.

pr51064.cc:2:18: warning: suggest parentheses around ‘+’ inside ‘>>’
[-Wparentheses]


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

* [Bug c++/51064] False Positive for -Wparentheses
  2011-11-09 15:00 [Bug c++/51064] New: False Positive for -Wparentheses sascha.cunz at gmx dot net
  2011-11-09 18:51 ` [Bug c++/51064] " manu at gcc dot gnu.org
@ 2012-01-04 12:15 ` paolo.carlini at oracle dot com
  2012-01-04 16:40 ` paolo at gcc dot gnu.org
  2012-01-04 16:41 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-04 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-04 12:14:50 UTC ---
On it.


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

* [Bug c++/51064] False Positive for -Wparentheses
  2011-11-09 15:00 [Bug c++/51064] New: False Positive for -Wparentheses sascha.cunz at gmx dot net
  2011-11-09 18:51 ` [Bug c++/51064] " manu at gcc dot gnu.org
  2012-01-04 12:15 ` paolo.carlini at oracle dot com
@ 2012-01-04 16:40 ` paolo at gcc dot gnu.org
  2012-01-04 16:41 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-01-04 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-01-04 16:40:01 UTC ---
Author: paolo
Date: Wed Jan  4 16:39:53 2012
New Revision: 182880

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182880
Log:
/cp
2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51064
    * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
    the tree returned by build_x_binary_op.

/testsuite
2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51064
    * g++.dg/warn/Wparentheses-26.C: New.


Added:
    trunk/gcc/testsuite/g++.dg/warn/Wparentheses-26.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51064] False Positive for -Wparentheses
  2011-11-09 15:00 [Bug c++/51064] New: False Positive for -Wparentheses sascha.cunz at gmx dot net
                   ` (2 preceding siblings ...)
  2012-01-04 16:40 ` paolo at gcc dot gnu.org
@ 2012-01-04 16:41 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-04 16:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-04 16:41:03 UTC ---
Fixed for 4.7.0.


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

end of thread, other threads:[~2012-01-04 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 15:00 [Bug c++/51064] New: False Positive for -Wparentheses sascha.cunz at gmx dot net
2011-11-09 18:51 ` [Bug c++/51064] " manu at gcc dot gnu.org
2012-01-04 12:15 ` paolo.carlini at oracle dot com
2012-01-04 16:40 ` paolo at gcc dot gnu.org
2012-01-04 16:41 ` 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).