Opened 4 years ago
Closed 4 years ago
#224 closed defect (fixed)
Cannot initialize static local constant
Reported by: | mlbrooks | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
Similar to #182, except here, the user's declaration is lexically scoped as local.
int main() { static const char bar = -1; printf("done\n"); }
Expected (everywhere): Compiles successfully and runs with output done
Actual (gcc8, gcc10): Compiles successfully and segfaults on startup.
Actual (gcc6): as expected
Change History (1)
comment:1 Changed 4 years ago by
Owner: | set to Michael Brooks <mlbrooks@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In f1791a4: