Bug 23631 – [REG master] ./src/importc.h:80:8: warning: undefining "__has_builtin"

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2023-01-15T18:36:50Z
Last change time
2023-01-30T00:19:39Z
Keywords
backend, ImportC
Assigned to
No Owner
Creator
Iain Buclaw
See also
https://github.com/dlang/dmd/pull/14801

Comments

Comment #0 by ibuclaw — 2023-01-15T18:36:50Z
This nonsense warning has started to appear when building druntime. --- ../compiler/../generated/linux/release/64/dmd -c -conf= -Isrc -Iimport -w -de -preview=dip1000 -preview=fieldwise -m64 -fPIC -preview=dtorfields -O -release -inline -version=Shared -fPIC -version=Shared -fPIC -I. src/core/stdc/errno.c -of../generated/linux/release/64/errno_c.o In file included from <command-line>: ./src/importc.h:80:8: warning: undefining "__has_builtin" 80 | #undef __has_builtin | ^~~~~~~~~~~~~
Comment #1 by ibuclaw — 2023-01-15T20:52:32Z
All the tests fail in the testsuite too. --- ============================== Test 'compilable/vastartend.c' failed: expected: ---- ---- actual: ---- In file included from <command-line>: /build/dlang/dmd/compiler/test/../../druntime/import/importc.h:80:8: warning: undefining "__has_builtin" 80 | #undef __has_builtin | ^~~~~~~~~~~~~ ---- diff: ---- - +In file included from <command-line>: +/build/dlang/dmd/compiler/test/../../druntime/import/importc.h:80:8: warning: undefining "__has_builtin" + 80 | #undef __has_builtin + | ^~~~~~~~~~~~~ ---- >>> TARGET FAILED: compilable/vastartend.c FAILED targets: - compilable/test22758.c - compilable/test23038.c - compilable/enumbase.c - compilable/test22577.c - compilable/test23002.c - compilable/test22886.c - compilable/test23008.c - compilable/test22842.c - compilable/test22894.c - compilable/cppflags.c - compilable/test23923.c - compilable/test22887.c - compilable/test22928.c - compilable/test22346.c - compilable/test22808.c - compilable/test23030.c - compilable/test22895.c - compilable/test22970.c - compilable/casmmangling.d - compilable/noreturn.c - compilable/testcstuff1.c - compilable/testcstuff3.d - compilable/arraytopointer.c - compilable/test22927.c - compilable/test23029.c - compilable/test22933.c - compilable/test22727.c - compilable/test23217.c - compilable/test23583.c - compilable/test22761.c - compilable/test22877.c - compilable/test22885.c - compilable/testdefines.d - compilable/alignas.c - compilable/test23622.c - compilable/test23616.c - compilable/test22924.c - compilable/test23004.c - compilable/test22625.d - compilable/test22755.c - compilable/test22607.c - compilable/test22793.c - compilable/test23066.c - compilable/test22955.c - compilable/test22698.c - compilable/test22757.c - compilable/test22705.c - compilable/test23054.c - compilable/valist.c - compilable/test23034.c - compilable/ctests2.c - compilable/test22807.c - compilable/test22892.c - compilable/test22725.c - compilable/test22699.c - compilable/test22734.d - compilable/cimport.c - compilable/test22665.d - compilable/ctests1.c - compilable/test23044.c - compilable/test22904.c - compilable/vastartend.c make: *** [Makefile:194: run_compilable_tests] Error 1
Comment #2 by bugzilla — 2023-01-19T03:43:28Z
ImportC does not has builtin, and those macros are predefined by cpp. Therefore, cpp is run with -Wno-builtin-macro-redefined. Perhaps you are building with an earlier dmd? That -W switch was added to dmd's call to cpp very recently.
Comment #3 by ibuclaw — 2023-01-19T11:30:01Z
(In reply to Walter Bright from comment #2) > ImportC does not has builtin, and those macros are predefined by cpp. > Therefore, cpp is run with -Wno-builtin-macro-redefined. > > Perhaps you are building with an earlier dmd? That -W switch was added to > dmd's call to cpp very recently. No, you are not seeing this because you're building with an outdated toolcahin. I'm building master, everything is broken since https://github.com/dlang/dmd/pull/14801 CI is also broken when updating to latest toolchain, so I've had to revert it here: https://github.com/dlang/dmd/pull/14824
Comment #4 by ibuclaw — 2023-01-30T00:19:39Z
Bad #undef/#define of reserved macros has been reverted in https://github.com/dlang/dmd/pull/14824