[Bug c/35384] Variables declared as 'static char * avar = "some string";' cannot be modified

2008-02-26 Thread Quinlan at ACM dot org
--- Comment #1 from Quinlan at ACM dot org 2008-02-26 18:59 --- I am building with compiler flags set to: -c -DLINUX -gdwarf-2 -g3 -g -O -DDEBUG -- Quinlan at ACM dot org changed: What|Removed |Added

[Bug c/35384] New: Variables declared as 'static char * avar = "some string";' cannot be modified

2008-02-26 Thread Quinlan at ACM dot org
Variables declared as 'static char * avar = "some string";' cannot be modified Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at

[Bug c/35384] Variables declared as 'static char * avar = "some string";' cannot be modified

2008-02-26 Thread Quinlan at ACM dot org
--- Comment #3 from Quinlan at ACM dot org 2008-02-26 20:10 --- I appreciate your answer, however shouldn't this declaration: static char * avar = "some string"; be identical to this: static char * avar = NULL; avar = "some string"; Yet when the appli

[Bug c/35384] Variables declared as 'static char * avar = "some string";' cannot be modified

2008-02-26 Thread Quinlan at ACM dot org
--- Comment #4 from Quinlan at ACM dot org 2008-02-26 21:05 --- If the problem is that the char pointer is pointing to a constant value in: static char * avar = "some string"; then perhaps initializing with an array of one string as in this line work: static char * ava