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

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> ---
I can reproduce the problem with Cygwin headers, and a reduced standalone
program (no standard library headers) is:

int printf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));

int main(void)
{
    printf("%d\n", 0L);
    return 0;
}

One of the warnings is because of the attribute, the other is built-in to GCC:
removing the format attribute gets rid of a warning, passing
-fno-builtin-printf also gets rid of a warning (presumably the other one).

I do not know if the problem is in the headers (that they should not be
specifying the format attribute), or in GCC (that it should be ignoring the
format attribute if it's already known).

Reply via email to