public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value
       [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
@ 2015-02-28 16:43 ` manu at gcc dot gnu.org
  2015-04-13 16:38 ` arnaud.bienner at ensimag dot fr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2015-02-28 16:43 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: 2952 bytes --]

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-28
                 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> ---
I'm going to confirm this because we obviously want it.
>From gcc-bugs-return-478827-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Feb 28 12:58:34 2015
Return-Path: <gcc-bugs-return-478827-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 99457 invoked by alias); 28 Feb 2015 12:58:34 -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 99431 invoked by uid 48); 28 Feb 2015 12:58:31 -0000
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65249] unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4
Date: Sat, 28 Feb 2015 16:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: olegendo at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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: cc attachments.created
Message-ID: <bug-65249-4-kQ8cNTZObU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65249-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65249-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-02/txt/msg03159.txt.bz2
Content-length: 491

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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

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

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 34901
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4901&actioníit
Reduced test case


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

* [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value
       [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
  2015-02-28 16:43 ` [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value manu at gcc dot gnu.org
@ 2015-04-13 16:38 ` arnaud.bienner at ensimag dot fr
  2015-04-15 22:40 ` arnaud.bienner at ensimag dot fr
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: arnaud.bienner at ensimag dot fr @ 2015-04-13 16:38 UTC (permalink / raw)
  To: gcc-bugs

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

Arnaud Bienner <arnaud.bienner at ensimag dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnaud.bienner at ensimag dot fr

--- Comment #2 from Arnaud Bienner <arnaud.bienner at ensimag dot fr> ---
Related bug: bug 53598.


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

* [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value
       [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
  2015-02-28 16:43 ` [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value manu at gcc dot gnu.org
  2015-04-13 16:38 ` arnaud.bienner at ensimag dot fr
@ 2015-04-15 22:40 ` arnaud.bienner at ensimag dot fr
  2015-04-16  0:43 ` manu at gcc dot gnu.org
  2015-04-16  6:05 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: arnaud.bienner at ensimag dot fr @ 2015-04-15 22:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Arnaud Bienner <arnaud.bienner at ensimag dot fr> ---
Created attachment 35324
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35324&action=edit
unused-comparison warning

I also believe it can be useful to have "unused comparison" warning (i.e.
something more specific than current "unused value" warning, because they are
likely to be typo.
Having a dedicated warning will allow people who want to activate this warning
specifically and/or to turn it into an error.

So I started to have a look at this and I would like to have some feedback from
someone more experienced.
It's my first patch to gcc, so it is probably not perfect.

One thing that doesn't work is turning on this warning using
-Wunused-comparison parameter. But surprisingly, turning it off with
-Wno-unused-comparison (when -Wunused or -Wall is used) works. Not sure what
I'm missing here.

The patch would just be a first step: the next step would be to also raise this
warning in the case of a "==" operator overloading in C++ (which seems to be
the case that doesn't raise a warning currently). Not sure yet how to do this.


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

* [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value
       [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-04-15 22:40 ` arnaud.bienner at ensimag dot fr
@ 2015-04-16  0:43 ` manu at gcc dot gnu.org
  2015-04-16  6:05 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2015-04-16  0:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Arnaud Bienner from comment #3)
> Created attachment 35324 [details]
> unused-comparison warning

You need testcases, and to run the testsuite. See point 4 at:
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

> One thing that doesn't work is turning on this warning using
> -Wunused-comparison parameter. But surprisingly, turning it off with
> -Wno-unused-comparison (when -Wunused or -Wall is used) works. Not sure what
> I'm missing here.

That is very weird. I don't see anything wrong in your patch about this.

Nonetheless, please add the warning to c-family/c.opt not to common.opt since
it is a C/C++ warning.

Also watch out for the formatting (too long lines, incorrect indentation, etc.)
See point 6 in the link above.

> The patch would just be a first step: the next step would be to also raise
> this warning in the case of a "==" operator overloading in C++ (which seems
> to be the case that doesn't raise a warning currently). Not sure yet how to
> do this.

It is more than ok to do one patch per step. Try to get the first patch right
and committed, then worry about the next.
>From gcc-bugs-return-483718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 16 00:55:05 2015
Return-Path: <gcc-bugs-return-483718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 60044 invoked by alias); 16 Apr 2015 00:55:05 -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 59603 invoked by uid 48); 16 Apr 2015 00:55:00 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/65781] gcc-5.1.0-RC-20150412 thinks it is 5.0.1
Date: Thu, 16 Apr 2015 00:55: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-65781-4-VD5RhZ9y3M@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65781-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65781-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg01270.txt.bz2
Content-length: 663

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

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

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
To be honest, it is pretty confusing even to me. If 5.0.1 denotes RC1, then why
not call it  5.0.1-20150412 ? Then RC2 would be denoted by 5.0.2, and so on. As
a general rule, X.0.N, where N > 0 could always be release candidate number N.
>From gcc-bugs-return-483719-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 16 01:39:01 2015
Return-Path: <gcc-bugs-return-483719-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1838 invoked by alias); 16 Apr 2015 01:39:01 -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 1782 invoked by uid 48); 16 Apr 2015 01:38:57 -0000
From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64921] [4.9/5/6 Regression] FAIL: gfortran.dg/class_allocate_18.f90
Date: Thu, 16 Apr 2015 01:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jvdelisle at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-64921-4-8kjs1h6Phi@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64921-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64921-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-04/txt/msg01271.txt.bz2
Content-length: 428

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

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

--- Comment #13 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I still see this failure on trunk. 6.0


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

* [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value
       [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-04-16  0:43 ` manu at gcc dot gnu.org
@ 2015-04-16  6:05 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-04-16  6:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Arnaud Bienner from comment #3)
> One thing that doesn't work is turning on this warning using
> -Wunused-comparison parameter. But surprisingly, turning it off with
> -Wno-unused-comparison (when -Wunused or -Wall is used) works. Not sure what
> I'm missing here.

Because the emit_side_effect_warnings calls are guarded by warn_unused_value.


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-62182-4@http.gcc.gnu.org/bugzilla/>
2015-02-28 16:43 ` [Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value manu at gcc dot gnu.org
2015-04-13 16:38 ` arnaud.bienner at ensimag dot fr
2015-04-15 22:40 ` arnaud.bienner at ensimag dot fr
2015-04-16  0:43 ` manu at gcc dot gnu.org
2015-04-16  6:05 ` mpolacek 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).