[Bug c/81404] New: suggested hints for standard C macros should avoid GCC predefined macros
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 12 02:43:00 GMT 2017
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__
More information about the Gcc-bugs
mailing list