[LLVMbugs] [Bug 23543] New: modification of non-modifiable lvalue allowed in C (struct with const member)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 15 18:07:32 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23543

            Bug ID: 23543
           Summary: modification of non-modifiable lvalue allowed in C
                    (struct with const member)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang accepts this invalid code in C mode:

struct S { const int n; } a;
void f(struct S s) { a = s; }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150516/e6518d2f/attachment.html>


More information about the llvm-bugs mailing list