Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

ccc ignores -x assembler-with-cpp rev. 66921 #4232

Closed Quuxplusone closed 15 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR3808
Status RESOLVED FIXED
Importance P normal
Reported by Diane Bruce (db@db.net)
Reported on 2009-03-14 11:57:49 -0700
Last modified on 2009-03-14 19:12:13 -0700
Version unspecified
Hardware PC FreeBSD
CC ahornung@gmail.com, anton@korobeynikov.info, clattner@nondot.org, daniel@zuster.org, db@db.net, ed@80386.nl, llvm-bugs@lists.llvm.org, pawel.worach@gmail.com, rdivacky@freebsd.org
Fixed by commit(s)
Attachments testcase.s (40 bytes, text/plain)
Types.py.diff (457 bytes, text/x-patch)
Blocks PR3696
Blocked by
See also
Created attachment 2713
asm that works on gcc but not ccc

ccc does not run the preprocessor when asked for asm
with rev 66921
rev 66623 is known to work.

ccc -c  -x assembler-with-cpp testcase.s
testcase.s: Assembler messages:
testcase.s:4: Error: junk `(end)' after expression

cc -c  -x assembler-with-cpp testcase.s
(no error)

cc -c   testcase.s
testcase.s: Assembler messages:
testcase.s:4: Error: junk `(end)' after expression
Quuxplusone commented 15 years ago

Attached testcase.s (40 bytes, text/plain): asm that works on gcc but not ccc

Quuxplusone commented 15 years ago

Attached Types.py.diff (457 bytes, text/x-patch): Apply against Types.py in ccclib

Quuxplusone commented 15 years ago

I turned on support for using clang to handle -x assembler-with-cpp (previously it had been using gcc).

As it turns out, this bug is a problem in clang's assembler-with-cpp handling. We do not properly recognize the call to the macro. The problem is that in C mode this is an instance of the gcc extended "$" in identifiers.

For now, consider using -ccc-no-clang-cpp to work around (this must be the first argument to the driver). You can also do this via the environment variable 'CCC_ADD_ARGS=-ccc-no-clang-cpp'

Chris, is this much work to fix in clang?

Quuxplusone commented 15 years ago

_Bug 3805 has been marked as a duplicate of this bug._

Quuxplusone commented 15 years ago

Fixed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013988.html