[LLVMbugs] [Bug 17998] New: Trunk/3.4 macro parsing issue (works in 3.3)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Nov 19 17:12:56 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=17998
Bug ID: 17998
Summary: Trunk/3.4 macro parsing issue (works in 3.3)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dl9pf at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following errors happen only in trunk/3.4 whereas 3.3 is fine:
/home/dl9pf/llvmlinux/targets/x86_64/src/linux/arch/x86/crypto/aesni-intel_glue.c:1348:1:
error: variable has incomplete type
'const struct x86cpu_device_id'
MODULE_DEVICE_TABLE(x86cpu, aesni_cpu_id);
^
/home/dl9pf/llvmlinux/targets/x86_64/src/linux/include/linux/module.h:145:3:
note: expanded from macro 'MODULE_DEVICE_TABLE'
MODULE_GENERIC_TABLE(type##_device,name)
^
/home/dl9pf/llvmlinux/targets/x86_64/src/linux/include/linux/module.h:88:33:
note: expanded from macro 'MODULE_GENERIC_TABLE'
extern const struct gtype##_id __mod_##gtype##_table \
^
<scratch space>:61:1: note: expanded from here
__mod_x86cpu_device_table
^
The code looks like:
[...]
#define MODULE_GENERIC_TABLE(gtype,name) \
extern const struct gtype##_id __mod_##gtype##_table \
__attribute__ ((unused, alias(__stringify(name))))
#else /* !MODULE */
#define MODULE_GENERIC_TABLE(gtype,name)
#endif
[...]
#define MODULE_DEVICE_TABLE(type,name) \
MODULE_GENERIC_TABLE(type##_device,name)
Attached is the preprocessed arch/x86/crypto/aesni-intel_glue.i .
It compiles with 3.3 and barfs with 3.4/trunk.
clang-3.3 -S aesni-intel_glue.i
vs.
clang-3.4 -S aesni-intel_glue.i
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131120/bca71efa/attachment.html>
More information about the llvm-bugs
mailing list