Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Craig Marby
Thu, 16 Apr 1992 09:40
Incorrect warning 'value computed is not used' generated by GCC 2.0
Author: Craig Marby
Date: Thu, 16 Apr 1992 09:40
Date: Thu, 16 Apr 1992 09:40
30 lines
890 bytes
890 bytes
Hi,
The following program
main()
{
int i = 0;
int *ptr_i;
ptr_i = &i;
*ptr_i++;
*ptr_i = *ptr_i + 1;
return 0;
}
when compiled by gcc version 2.0 using
gcc -Wall bug.c
generates the following warning
bug.c:8: warning: value computed is not used
this refers to *ptr_i++, which is synonymous with *ptr_i = *ptr_i + 1.
Generating such a warning for *ptr_++ is incorrect.
Craig Marby
marby@layla.harvard.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads