This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81404] New: suggested hints for standard C macros should avoid GCC predefined macros
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jul 2017 02:43:05 +0000
- Subject: [Bug c/81404] New: suggested hints for standard C macros should avoid GCC predefined macros
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81404
Bug ID: 81404
Summary: suggested hints for standard C macros should avoid GCC
predefined macros
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
The fix-it hints printed along with errors for standard C library macros like
INT_MAX suggest GCC predefined symbols like __INT_MAX__ over the standard
symbols. They should suggest the latter (along with the header the symbol is
defined in).
$ cat a.c && gcc -S -Wall a.c
int i = INT_MAX;
a.c:1:9: error: ‘INT_MAX’ undeclared here (not in a function); did you mean
‘__INT_MAX__’?
int i = INT_MAX;
^~~~~~~
__INT_MAX__