This is the mail archive of the gcc-patches@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]

Re: PR c/30949 "incompatible pointer type" warning does not point to declaration


2008/8/28 Joseph S. Myers <joseph@codesourcery.com>:
>
> This is OK if you verify that the message in the inform call within the
> macro definition does get properly extracted into gcc.pot when gcc.pot is
> regenerated.  (You do not need to check in the regenerated gcc.pot.)

In gcc.pot there is:

#. This macro is used to emit diagnostics to ensure that all format
#. strings are complete sentences, visible to gettext and checked at
#. compile time.
#: c-typeck.c:3962
#, gcc-internal-format
msgid "expected %qT but argument is of type %qT"
msgstr ""

Is that OK?

> I don't think this is really a full fix for the issue, in that the case at
> the bottom of convert_for_assignment where there is a hard error saying
> "incompatible type" could just as much do with such a note.  (The error
> rather than a pedwarn is where the compiler cannot do any plausible
> conversion at all, e.g. where one of the types is a structure or union.)
> I also don't know if C++ has any similar issues.

The PR is about this specific warning. I will fix the other messages
in c-typeck.c in follow-up patches. If someone finds a similar issue
in C++, please open a PR.

Cheers,

Manuel.


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