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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed via r268251.  GCC issues the following warnings for the test case in
comment #0:

$ cat pr88886.c && gcc -S -Wall -Wextra pr88886.c
int sscanf(long, unsigned[], ...);
void a() { sscanf(0, ""); }
pr88886.c:1:5: warning: conflicting types for built-in function ‘sscanf’;
expected ‘int(const char *, const char *, ...)’
[-Wbuiltin-declaration-mismatch]
    1 | int sscanf(long, unsigned[], ...);
      |     ^~~~~~
pr88886.c:1:1: note: ‘sscanf’ is declared in header ‘<stdio.h>’
  +++ |+#include <stdio.h>
    1 | int sscanf(long, unsigned[], ...);
pr88886.c: In function ‘a’:
pr88886.c:2:22: warning: passing argument 2 of ‘sscanf’ from incompatible
pointer type [-Wincompatible-pointer-types]
    2 | void a() { sscanf(0, ""); }
      |                      ^~
      |                      |
      |                      char *
pr88886.c:1:18: note: expected ‘unsigned int *’ but argument is of type ‘char
*’
    1 | int sscanf(long, unsigned[], ...);
      |                  ^~~~~~~~~~

Reply via email to