[LLVMbugs] [Bug 7116] New: generated C code is not valid C code

1 view
Skip to first unread message

bugzill...@llvm.org

unread,
May 11, 2010, 3:08:41 PM5/11/10
to llvm...@cs.uiuc.edu
http://llvm.org/bugs/show_bug.cgi?id=7116

Summary: generated C code is not valid C code
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: C
AssignedTo: unassig...@nondot.org
ReportedBy: i...@az2000.de
CC: llvm...@cs.uiuc.edu


93-018:build-llvm-bitcode az$ ~/Programmierung/CppIDE/llvm-src/Debug/bin/clang
test.optim.o.cbe.c
test.optim.o.cbe.c:159:1: error: 'main' must return 'int'
unsigned int main(void);
^
test.optim.o.cbe.c:202:1: error: 'main' must return 'int'
unsigned int main(void) {
^
2 errors generated.


Also not by clang++:

93-018:build-llvm-bitcode az$
~/Programmierung/CppIDE/llvm-src/Debug/bin/clang++ test.optim.o.cbe.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
test.optim.o.cbe.c:159:1: error: 'main' must return 'int'
unsigned int main(void);
^
test.optim.o.cbe.c:173:58: error: redefinition of '_ZStL8__ioinit'
static struct l_class_OC_std_KD__KD_ios_base_KD__KD_Init _ZStL8__ioinit;
^
test.optim.o.cbe.c:168:58: note: previous definition is here
static struct l_class_OC_std_KD__KD_ios_base_KD__KD_Init _ZStL8__ioinit;
^
test.optim.o.cbe.c:174:26: error: redefinition of '_OC_str'
static struct l_unnamed2 _OC_str = { "Hello World" };
^
test.optim.o.cbe.c:169:26: note: previous definition is here
static struct l_unnamed2 _OC_str;
^
test.optim.o.cbe.c:202:1: error: 'main' must return 'int'
unsigned int main(void) {
^
4 errors generated.


GCC only gives a warning about it:

93-018:build-llvm-bitcode az$ gcc test.optim.o.cbe.c /usr/lib/libstdc++.6.dylib
test.optim.o.cbe.c: In function ‘main’:
test.optim.o.cbe.c:202: warning: return type of ‘main’ is not ‘int’

--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
LLVM...@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

bugzill...@llvm.org

unread,
Mar 26, 2012, 6:58:31 AM3/26/12
to llvm...@cs.uiuc.edu
http://llvm.org/bugs/show_bug.cgi?id=7116

Benjamin Kramer <benn...@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |benn...@gmail.com
Resolution| |WONTFIX

--- Comment #2 from Benjamin Kramer <benn...@gmail.com> 2012-03-26 05:58:31 CDT ---
The C backend was removed from svn trunk and is no longer maintained. Closing
the bug.

Reply all
Reply to author
Forward
0 new messages