GNU bug report logs -
#30756
GCC >= 6 '-isystem' and C_INCLUDE_PATH behavior changed, breaking #include_next
Previous Next
Full log
Message #57 received at 30756 <at> debbugs.gnu.org (full text, mbox):
I am seeing this issue with guix (GNU Guix)
f69439dff438e59fbd24b76949b8767360f2cd72 using gcc (GCC) 9.2.0.
e.g.
$ cat > t.c
#include <error.h>
int main()
{
error (0, 0, "what!?");
return 0;
}
$ gcc -Wformat -Wformat-nonliteral -Werror -g -O2 -o t t.c
In file included from /home/mark/.guix-profile/include/error.h:52,
from t.c:1:
/home/mark/.guix-profile/include/bits/error.h: In function ‘error’:
/home/mark/.guix-profile/include/bits/error.h:39:5: error: format not a
string literal, argument types not checked [-Werror=format-nonliteral]
39 | __error_noreturn (__status, __errnum, __format,
__va_arg_pack ());
| ^~~~~~~~~~~~~~~~
/home/mark/.guix-profile/include/bits/error.h:41:5: error: format not a
string literal, argument types not checked [-Werror=format-nonliteral]
41 | __error_alias (__status, __errnum, __format, __va_arg_pack
());
| ^~~~~~~~~~~~~
/home/mark/.guix-profile/include/bits/error.h: In function
‘error_at_line’:
/home/mark/.guix-profile/include/bits/error.h:68:10: error: format not
a string literal, argument types not checked [-Werror=format-
nonliteral]
68 | __va_arg_pack ());
| ^~~~~~~~~~~~~
/home/mark/.guix-profile/include/bits/error.h:71:7: error: format not a
string literal, argument types not checked [-Werror=format-nonliteral]
71 | __format, __va_arg_pack ());
| ^~~~~~~~
cc1: all warnings being treated as errors
And indeed only CPATH is set, but not C_INCLUDE_PATH.
unsetting CPATH and setting C_INCLUDE_PATH does resolve the issue.
This bug report was last modified 5 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.