This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/62270] -Wlogical-not-parentheses warnings


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-01
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |tkoenig at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Tobias, I think you added the code for interface.c.

A longer version would be

&& (formal->attr.intent != INTENT_UNKNOWN) == INTENT_UNKNOWN

or rather

    formal->attr.intent != INTENT_UNKNOWN

Is this what is intended here?


The second part is identical to

(e->ref->u.ar.type != 0) != 1

Because ar_type is always unequal to zero, this reduces to

  1 != 1

which again reduces to

  0

which I suspect is a bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]