[Bug c/89379] New: -Wformat is supposed not to give warning

2019-02-17 Thread lvenkatakumarchakka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89379

Bug ID: 89379
   Summary: -Wformat is supposed not to give warning
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lvenkatakumarchakka at gmail dot com
  Target Milestone: ---

I have written code as follows:

#include
#include

int main()
{
uint16_t value;
scanf( "%"PRIu16, &value );
}

seeing warning

$ gcc foo.c -Wformat
foo.c: In function ‘main’:
foo.c:7:9: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but
argument 2 has type ‘uint16_t *’ {aka ‘short unsigned int *’} [-Wformat=]
  scanf( "%"PRIu16, &value );
 ^~~~~
In file included from foo.c:1:
/usr/include/inttypes.h:103:19: note: format string is defined here
 # define PRIu16  "u"

[Bug c/69578] New: -Wuninitialized not issuing warning.

2016-01-31 Thread lvenkatakumarchakka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69578

Bug ID: 69578
   Summary: -Wuninitialized not issuing warning.
   Product: gcc
   Version: 5.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lvenkatakumarchakka at gmail dot com
  Target Milestone: ---

int main()
{
int i, j;
for( j=0; j<10; j++ )
{
printf( "%d\n", i );
for( i=0; i<10;i++ );
}
return 0;
}


compiling above code with -Wuninitialized is supposed to issue warning which is
not happening.