[LLVMbugs] [Bug 4388] New: clang: preprocessor output missing newline

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jun 14 01:52:09 PDT 2009


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

           Summary: clang: preprocessor output missing newline
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 4068


clang -E -MD -MF arch/x86/kernel/acpi/realmode/.wakeup.lds.d  -nostdinc
-isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.3/include -Iinclude 
-I/home/edwin/builds/linux-2.6/arch/x86/include -include
include/linux/autoconf.h -D__KERNEL__   -P -C -D__ASSEMBLY__ -o
arch/x86/kernel/acpi/realmode/wakeup.lds
arch/x86/kernel/acpi/realmode/wakeup.lds.S


Creates:
/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.30
 * Sun Jun 14 11:37:11 2009
 */# 2 "<built-in>" 2 3

gcc creates:


/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.30
 * Sun Jun 14 11:37:11 2009
 */


Notice the missing newline before #2.
gcc doesn't output #2 at all.
However even if I manually add a newline, ld still rejects it.
I think no #2 should be output, to be compatible with gcc.

ld:arch/x86/kernel/acpi/realmode/wakeup.lds:6: ignoring invalid character `#'
in expression


Input file:
/*
 * wakeup.ld
 *
 * Linker script for the real-mode wakeup code
 */
#undef i386
#include "wakeup.h"


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