[LLVMbugs] [Bug 17319] New: clang compiles code without error, but gcc fails with error.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Sep 21 16:38:45 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17319
Bug ID: 17319
Summary: clang compiles code without error, but gcc fails with
error.
Product: clang
Version: 3.2
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: James.Dutton at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11259
--> http://llvm.org/bugs/attachment.cgi?id=11259&action=edit
The bfl.c file showing the errors.
Seems to be a problem with va_start, va_arg, va_end macros.
Compiling with clang reports no errors
/bin/bash ../../../../libtool --tag=CC --mode=compile clang -DHAVE_CONFIG_H
-I. -I../../../../src -I../../../../include -O0 -g3 -Wall -fPIC -g -O2 -MT
bfl.lo -MD -MP -MF .deps/bfl.Tpo -c -o bfl.lo bfl.c
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../../../../src
-I../../../../include -O0 -g3 -Wall -fPIC -g -O2 -MT bfl.lo -MD -MP -MF
.deps/bfl.Tpo -c bfl.c -fPIC -DPIC -o .libs/bfl.o
bfl.c:310:1: warning: unused function 'dump_reloc_set' [-Wunused-function]
dump_reloc_set (bfd *abfd, asection *sec, arelent **relpp, long relcount)
^
1 warning generated.
Compiling with gcc reports errors and fails to compile.
/bin/bash ../../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../../../../src -I../../../../include -O0 -g3 -Wall -fPIC -g -O2 -MT bfl.lo
-MD -MP -MF .deps/bfl.Tpo -c -o bfl.lo bfl.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../src
-I../../../../include -O0 -g3 -Wall -fPIC -g -O2 -MT bfl.lo -MD -MP -MF
.deps/bfl.Tpo -c bfl.c -fPIC -DPIC -o .libs/bfl.o
bfl.c: In function 'bf_get_reloc_table_code_section':
bfl.c:391:11: warning: variable 'sym_val' set but not used
[-Wunused-but-set-variable]
bfl.c:389:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
bfl.c: In function 'bf_get_reloc_table_data_section':
bfl.c:455:11: warning: variable 'sym_val' set but not used
[-Wunused-but-set-variable]
bfl.c:453:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
bfl.c: In function 'bf_get_reloc_table_rodata_section':
bfl.c:519:11: warning: variable 'sym_val' set but not used
[-Wunused-but-set-variable]
bfl.c:517:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
bfl.c: In function 'bf_disassemble_print_callback':
bfl.c:935:2: warning: implicit declaration of function 'va_start'
[-Wimplicit-function-declaration]
bfl.c:937:3: warning: implicit declaration of function 'va_arg'
[-Wimplicit-function-declaration]
bfl.c:937:21: error: expected expression before 'char'
bfl.c:940:21: error: expected expression before 'char'
bfl.c:946:2: warning: implicit declaration of function 'va_end'
[-Wimplicit-function-declaration]
bfl.c: At top level:
bfl.c:310:1: warning: 'dump_reloc_set' defined but not used [-Wunused-function]
make: *** [bfl.lo] Error 1
--
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/20130921/e6b7840d/attachment.html>
More information about the llvm-bugs
mailing list