Issue Details (XML | Word | Printable)

Key: PCC-286
Type: Bug Bug
Status: In Progress In Progress
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

pcc does not raise error for const modifications

Created: 24/Mar/11 09:13 AM   Updated: 27/Mar/11 05:16 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386

 Description  « Hide
the following code fragment

void foo(void)
        const char str[] = "bar";
        const int num = 31;

        str[1] = 0;
        num = 5;

really ought to fail compilation, but it does not

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 27/Mar/11 05:15 PM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 27/Mar/11 05:15 PM
Status Open [ 1 ] In Progress [ 3 ]
Anders Magnusson added a comment - 27/Mar/11 05:16 PM
This is well-known, and needs a bunch of internal changes to work, so const is currently not supported.