Git fork

Merge branch 'jh/struct-zero-init-with-older-clang' into maint-2.38

Work around older clang that warns against C99 zero initialization
syntax for struct.

* jh/struct-zero-init-with-older-clang:
config.mak.dev: disable suggest braces error on old clang versions

+25
+25
config.mak.dev
··· 69 69 endif 70 70 endif 71 71 72 + # Old versions of clang complain about initializaing a 73 + # struct-within-a-struct using just "{0}" rather than "{{0}}". This 74 + # error is considered a false-positive and not worth fixing, because 75 + # new clang versions do not, so just disable it. 76 + # 77 + # The "bug" was fixed in upstream clang 9. 78 + # 79 + # Complicating this is that versions of clang released by Apple have 80 + # their own version numbers (associated with the corresponding version 81 + # of XCode) unrelated to the official clang version numbers. 82 + # 83 + # The bug was fixed in Apple clang 12. 84 + # 85 + ifneq ($(filter clang1,$(COMPILER_FEATURES)),) # if we are using clang 86 + ifeq ($(uname_S),Darwin) # if we are on darwin 87 + ifeq ($(filter clang12,$(COMPILER_FEATURES)),) # if version < 12 88 + DEVELOPER_CFLAGS += -Wno-missing-braces 89 + endif 90 + else # not darwin 91 + ifeq ($(filter clang9,$(COMPILER_FEATURES)),) # if version < 9 92 + DEVELOPER_CFLAGS += -Wno-missing-braces 93 + endif 94 + endif 95 + endif 96 + 72 97 # https://bugzilla.redhat.com/show_bug.cgi?id=2075786 73 98 ifneq ($(filter gcc12,$(COMPILER_FEATURES)),) 74 99 DEVELOPER_CFLAGS += -Wno-error=stringop-overread