[llvm-bugs] [Bug 38059] New: Inconsistent behavior symbol generation c vs c++.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 4 08:55:17 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38059
Bug ID: 38059
Summary: Inconsistent behavior symbol generation c vs c++.
Product: clang
Version: 6.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: mostrows at gmail.com
CC: llvm-bugs at lists.llvm.org
Given this code (x.c):
int x;
const int y = 2;
extern const int z;
const int z = 3;
Compile: clang-6.0 -c x.c -o xc.o
Compile as c++: clang++-6.0 -c x.c -o x+.o
Look at generated symbols:
nm -a xc.o:
0000000000000004 C x
0000000000000000 a x.c
0000000000000000 R y
0000000000000004 R z
nm -a x+.o:
0000000000000000 B x
0000000000000000 a x.c
0000000000000000 R z
The C++ compilation does not generate a "y" symbol, but the C compilation does.
--
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/20180704/6985ab3a/attachment.html>
More information about the llvm-bugs
mailing list