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

           Summary: clang gives @encode a different type from gcc (and
                    related issues)
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Per summary; testcase:

int a[sizeof(@encode(int)) == 2 ? 1 : -1]; // Type is char[2]
char b[] = @encode(int); // Initialize like a string
char (*c)[2] = &@encode(int); // @encode is an lvalue

I'm not sure whether the differences here are intentional or not... there isn't
any standards document to refer to here :)  I don't see any good reason to be
incompatible with gcc here, though.

That said, I'm guessing these sort of constructs aren't common, considering
that nobody has complained about it yet.  (I haven't seen this in real-world
code; I was just trying it out of curiosity.)


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to