This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/71613] New: Useful warnings silenced when macros from system headers are used
- From: "ch3root at openwall dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Jun 2016 19:13:31 +0000
- Subject: [Bug c/71613] New: Useful warnings silenced when macros from system headers are used
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71613
Bug ID: 71613
Summary: Useful warnings silenced when macros from system
headers are used
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: ch3root at openwall dot com
Target Milestone: ---
Useful warnings seem to be silenced when macros from system headers are used.
For example, in the example below a warning would be useful for both enums but
only one warning is shown. The same can probably happen for other warnings.
Source code:
----------------------------------------------------------------------
#include <limits.h>
int main()
{
enum { e1 = LLONG_MIN };
enum { e2 = +LLONG_MIN };
}
----------------------------------------------------------------------
Results:
----------------------------------------------------------------------
$ gcc -std=c11 -pedantic -Wall -Wextra -O3 test.c && ./a.out
test.c: In function âmainâ:
test.c:6:15: warning: ISO C restricts enumerator values to range of âintâ
[-Wpedantic]
enum { e2 = +LLONG_MIN };
^
----------------------------------------------------------------------
gcc version: gcc (GCC) 7.0.0 20160616 (experimental)