[LLVMbugs] [Bug 3833] New: asm-with-cpp vs.# comments

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Mar 18 07:07:20 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=3833

           Summary: asm-with-cpp vs.#  comments
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pawel.worach at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Looks like # comments in asm-with-cpp sources on a line by themselves
get parsed like preprocessing directives.

<from FreeBSD boot code>
0>root at one /tmp# cat t.S
/*
 * Trampoline used to call read from within boot1.
 */
nread:          xor %ax,%ax                     # Sector offset in partition
nread.1:        mov $MEM_BUF,%bx                # Transfer buffer
                add 0x8(%si),%ax                # Get
                mov 0xa(%si),%cx                #  LBA
                push %cs                        # Read from
                callw xread.1                   #  disk
                jnc return                      # If success, return
                mov $msg_read,%si               # Otherwise, set the error
                                                #  message and fall through to
                                                #  the error routine
0>root at one /tmp# clang -E -o /dev/null t.S
t.S:12:52: error: invalid preprocessing directive
                                                #  message and fall through to
                                                   ^
t.S:13:52: error: invalid preprocessing directive
                                                #  the error routine
                                                   ^
2 diagnostics generated.
1>root at one /tmp# gcc -E -o /dev/null t.S
0>root at one /tmp#


-- 
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.



More information about the llvm-bugs mailing list