http://llvm.org/bugs/show_bug.cgi?id=16330
Bug ID: 16330
Summary: __attirbute__ ((common)) has no expected effect when
compiling for iOS or iOS Simulator
Product: dragonegg
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Hello,
had someone ever used Clang's extensions inside ObjC++ file, namely the
__attribute__ ((common)) ?
For me, there's a problem with that, LLVM Linker reports 'duplicit symbol'
error if I declare a variable with same name in .mm file and one or more .m or
.cpp files:
/* foo_A.m */
__attribute__ ((common)) int foo;
/* foo_B.m */
__attribute__ ((common)) int foo;
/* foo_C.mm */
__attribute__ ((common)) int foo;
Gives linker error.
However, everything is fine, once I obey the use of 'foo' in the 'foo_C.mm', or
just rename the variable - linker feels happy.
Is this behavior expected?
Reported clang version:
clang++ --version
Apple LLVM version 5.0 (clang-500.1.58) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
LLVM version:
llvm-g++-4.2 --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658)
(LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs