[LLVMbugs] [Bug 3382] New: clang rejects parentheses around initializer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jan 24 02:19:44 PST 2009


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

           Summary: clang rejects parentheses around initializer
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it


This comes from linux-2.6.28.1:

$ cat /tmp/bug23.c 
#define N_(text) (text)

char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
$ gcc -c -W -Wall /tmp/bug23.c
$ icc -c -w2 /tmp/bug23.c 
$ clang -w /tmp/bug23.c
/tmp/bug23.c:3:22: error: initialization with '{...}' expected for array
char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
                     ^~
1 diagnostic generated.
$ ~/eclair/eclair/src/parser/dest/bin/clang -E /tmp/bug23.c
# 1 "/tmp/bug23.c"
# 1 "/tmp/bug23.c" 1
# 0 "/tmp/bug23.c"
# 1 "<predefines>" 1
# 1 "/tmp/bug23.c" 2


char nohelp_text[] = ("Sorry, no help available for this option yet.\n");
$


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