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 c/39464] [4.6/4.7/4.8 Regression] Attribute may_alias causes invalid warning


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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-06 18:27:03 UTC ---
In any case, I'd limit the
              /* If there is a mismatch, do warn.  */
              else if (warn_pointer_sign)
                WARN_FOR_ASSIGNMENT (location, OPT_Wpointer_sign,
                                     G_("pointer targets in passing argument "
                                        "%d of %qE differ in signedness"),
                                     G_("pointer targets in assignment "  
                                        "differ in signedness"),
                                     G_("pointer targets in initialization "
                                        "differ in signedness"),
                                     G_("pointer targets in return differ "
                                        "in signedness"));
warning to actual sign differences only, i.e.
              else if (warn_pointer_sign
                       && TYPE_UNSIGNED (mvl) != TYPE_UNSIGNED (mvr))
If we want to warn about other cases (I think they are generally outside of the
scope of ISO C anyway), then we should have a differently worded warning after
this one for the TYPE_UNSIGNED (mvl) == TYPE_UNSIGNED (mvr) case.


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