https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115880
Sergey Fedorov <vital.had at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vital.had at gmail dot com --- Comment #6 from Sergey Fedorov <vital.had at gmail dot com> --- (In reply to Iain Sandoe from comment #2) > I have posted patches (which need an update [on my shorter TODO] that > implement the availability attribute). That makes a fix unnecessary - I > would much rather pursue the implementation of the attribute than keep on > applying band-aid fixincludes - the latter have been causing us some > difficulties where SDKs change even within one OS rev. > > The availability patches are on my darwin branches, along with patches to > remove the existing fixincludes which break on some SDK versions. > > So I agree that this bug is real - but I do not agree that the right > resolution is more fixincludes. This seems to be still broken in 14.2.0, at least MacPorts one (but it uses your patches). ``` :info:build /bin/sh ../libtool --tag=CC --mode=compile /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant.Tpo -c -o libglib_2_0_la-gvariant.lo `test -f 'gvariant.c' || echo './'`gvariant.c :info:build libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gutils.lo -MD -MP -MF .deps/libglib_2_0_la-gutils.Tpo -c gutils.c -o libglib_2_0_la-gutils.o :info:build libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gurifuncs.lo -MD -MP -MF .deps/libglib_2_0_la-gurifuncs.Tpo -c gurifuncs.c -o libglib_2_0_la-gurifuncs.o :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19, :info:build from gunicollate.c:30: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:126:1: error: attributes should be specified before the declarator in a function definition :info:build 126 | CF_INLINE CFOptionFlags CFUserNotificationCheckBoxChecked(CFIndex i) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(1UL << (8 + i)));} :info:build | ^~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:127:1: error: attributes should be specified before the declarator in a function definition :info:build 127 | CF_INLINE CFOptionFlags CFUserNotificationSecureTextField(CFIndex i) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(1UL << (16 + i)));} :info:build | ^~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:128:1: error: attributes should be specified before the declarator in a function definition :info:build 128 | CF_INLINE CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(n << 24));} :info:build | ^~~~~~~~~ :info:build mv -f .deps/libglib_2_0_la-gurifuncs.Tpo .deps/libglib_2_0_la-gurifuncs.Plo :info:build /bin/sh ../libtool --tag=CC --mode=compile /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant-core.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant-core.Tpo -c -o libglib_2_0_la-gvariant-core.lo `test -f 'gvariant-core.c' || echo './'`gvariant-core.c :info:build mv -f .deps/libglib_2_0_la-guniprop.Tpo .deps/libglib_2_0_la-guniprop.Plo :info:build /bin/sh ../libtool --tag=CC --mode=compile /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant-parser.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant-parser.Tpo -c -o libglib_2_0_la-gvariant-parser.lo `test -f 'gvariant-parser.c' || echo './'`gvariant-parser.c :info:build libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant.Tpo -c gvariant.c -o libglib_2_0_la-gvariant.o :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19, :info:build from gutils.c:127: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:126:1: error: attributes should be specified before the declarator in a function definition :info:build 126 | CF_INLINE CFOptionFlags CFUserNotificationCheckBoxChecked(CFIndex i) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(1UL << (8 + i)));} :info:build | ^~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:127:1: error: attributes should be specified before the declarator in a function definition :info:build 127 | CF_INLINE CFOptionFlags CFUserNotificationSecureTextField(CFIndex i) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(1UL << (16 + i)));} :info:build | ^~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:128:1: error: attributes should be specified before the declarator in a function definition :info:build 128 | CF_INLINE CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos) {return ((CFOptionFlags)(n << 24));} :info:build | ^~~~~~~~~ :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/string.h:63, :info:build from gunicollate.c:24: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:155:25: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 155 | kSSLProtocolUnknown CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 0, :info:build | ^~~~~~~~~~~~~~~~~~ :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:42, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:29, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:23, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:14: error: variably modified 'bytes' at file scope :info:build 193 | char bytes[kAuthorizationExternalFormLength]; :info:build | ^~~~~ :info:build libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant-core.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant-core.Tpo -c gvariant-core.c -o libglib_2_0_la-gvariant-core.o :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:99:44: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 99 | kSSLSessionOptionBreakOnServerAuth CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0) = 0, :info:build | ^~~~~~~~~~~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:150:18: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 150 | kSSLIdle CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0), /* no I/O performed yet */ :info:build | ^~~~~~~~~~~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:163:28: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 163 | kSSLClientCertNone CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0), :info:build | ^~~~~~~~~~~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:217:20: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 217 | kSSLServerSide CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0), :info:build | ^~~~~~~~~~~~~~~~~~ :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:223:20: error: expected ',' or '}' before '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15' :info:build 223 | kSSLStreamType CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0), :info:build | ^~~~~~~~~~~~~~~~~~ :info:build libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -D_REENTRANT -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -MT libglib_2_0_la-gvariant-parser.lo -MD -MP -MF .deps/libglib_2_0_la-gvariant-parser.Tpo -c gvariant-parser.c -o libglib_2_0_la-gvariant-parser.o :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/unistd.h:183, :info:build from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/unistd.h:72, :info:build from gutils.c:34: ```