Fixes for gcc-8.3 broke compilation with gcc-7.4

Hans-Bernhard Bröker HBBroeker@t-online.de
Fri Jul 19 17:11:00 GMT 2019


Hello one and all,

As of commit b66dddb56d14a4032969fe8bb92d64baa6e0362e,
winsup/cygwin/uname.cc no longer compiles with the current GCC version
installed with cygwin itself.  The newly added __attribute__ is unknown
to GCC 7, and thus triggers a -Werror for unused/unknown attributes:

$ LANG=C make
c++wrap -O2 -g -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Wall
-Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin
-fmessage-length=0 -MMD -Werror -fmerge-constants -ftracer
-mcmodel=small -std=gnu++98 -c -o uname.o
../../../../cygwin-clean-copy/winsup/cygwin/uname.cc
../../../../cygwin-clean-copy/winsup/cygwin/uname.cc: In function 'int
uname_x(utsname*)':
../../../../cygwin-clean-copy/winsup/cygwin/uname.cc:28:58: error:
'nonstring' attribute directive ignored [-Werror=attributes]
       char buf[NI_MAXHOST + 1] __attribute__ ((nonstring));
                                                          ^
cc1plus: all warnings being treated as errors
make: ***
[../../../../cygwin-clean-copy/winsup/cygwin/../Makefile.common:41:
uname.o] Error 1



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list