[Nasm-bugs] [Bug 3392695] New: Compilation fails in clang after 30844a4c628c121e26955f9e1e9eb5fa2e7f87d9

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Wed Jul 8 12:24:25 PDT 2020


https://bugzilla.nasm.us/show_bug.cgi?id=3392695

            Bug ID: 3392695
           Summary: Compilation fails in clang after
                    30844a4c628c121e26955f9e1e9eb5fa2e7f87d9
           Product: NASM
           Version: 2.15 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: dalecurtis at chromium.org
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Build from source archive using configure

30844a4c628c121e26955f9e1e9eb5fa2e7f87d9 added support for typeof(), but this
doesn't seem to work or isn't used correctly unfortunately:


clang version 11.0.0 (https://github.com/llvm/llvm-project/
fb1aa286c1400ad75cd066df6c0233332b3fd9b8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /d/code/chrome/src/third_party/llvm-build/Release+Asserts/bin

clang -MMD -MF obj/third_party/nasm/nasm/strlist.o.d -DDCHECK_ALWAYS_ON=1
-DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DCR_CLANG_REVISION=\"n358615-fb1aa286-1\" -DCOMPONENT_BUILD
-D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD
-D_LIBCPP_DEBUG=0 -DCR_LIBCXX_REVISION=375504
-DCR_SYSROOT_HASH=d6879d611f3dcf3da8dd92e080029394aa30bc42 -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -DHAVE_CONFIG_H -I../.. -Igen
-I../../third_party/nasm -I../../third_party/nasm/asm
-I../../third_party/nasm/disasm -I../../third_party/nasm/include
-I../../third_party/nasm/output -I../../third_party/nasm/x86
-fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector
-funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants
-fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang
-instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64
-Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang
-fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O2 -fno-ident
-fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1
-ftrivial-auto-var-init=pattern -fvisibility=hidden -Xclang -add-plugin -Xclang
find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc
-Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror
-Wall -Wno-unused-variable -Wno-misleading-indentation
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing
-Wno-unneeded-internal-declaration -Wno-undefined-var-template
-Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion
-Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment
-Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wmax-tokens
-Wno-unused-function -Wno-string-conversion -Wno-macro-redefined
-Wno-sign-compare -Wno-nonnull -Wno-uninitialized -std=c11
--sysroot=../../build/linux/debian_sid_amd64-sysroot -Wno-implicit-fallthrough
-c ../../third_party/nasm/nasmlib/strlist.c -o
obj/third_party/nasm/nasm/strlist.o
../../third_party/nasm/nasmlib/strlist.c:112:21: error: unknown type name
'typeof'; did you mean 'typedef'?
        e = nasm_vaxprintf(offsetin(*e, str), fmt, ap);
                           ^
../../third_party/nasm/include/compiler.h:210:34: note: expanded from macro
'offsetin'
#  define offsetin(p,m) offsetof(typeof(p),m)
                                 ^
../../third_party/nasm/nasmlib/strlist.c:112:21: error: expected a type
../../third_party/nasm/include/compiler.h:210:40: note: expanded from macro
'offsetin'
#  define offsetin(p,m) offsetof(typeof(p),m)
                                       ^
../../third_party/nasm/nasmlib/strlist.c:112:21: error: type name does not
allow storage class to be specified
../../third_party/nasm/include/compiler.h:210:34: note: expanded from macro
'offsetin'
#  define offsetin(p,m) offsetof(typeof(p),m)
                                 ^
../../third_party/nasm/nasmlib/strlist.c:112:31: error: type-id cannot have a
name
        e = nasm_vaxprintf(offsetin(*e, str), fmt, ap);
                                     ^
../../third_party/nasm/include/compiler.h:210:41: note: expanded from macro
'offsetin'
#  define offsetin(p,m) offsetof(typeof(p),m)
                                        ^
../../third_party/llvm-build/Release+Asserts/lib/clang/11.0.0/include/stddef.h:104:43:
note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                                          ^
4 errors generated.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list