aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Bitfields.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2018-04-26 18:00:36 +0200
committerGitHub <noreply@github.com>2018-04-26 18:00:36 +0200
commitf1d9a90486ac2744e0f2096eeaeedac117af5b9a (patch)
tree17da3fcddc04d9710f245a64e6124d7d13807c6a /cparser/Bitfields.ml
parent7d91167706b72103ddf9f4088cf02dd9761fdf47 (diff)
downloadcompcert-f1d9a90486ac2744e0f2096eeaeedac117af5b9a.tar.gz
compcert-f1d9a90486ac2744e0f2096eeaeedac117af5b9a.zip
Earlier, more comprehensive check for constant initializers (#88)
This commit checks *during elaboration* that initializers for global variables or local static variables are compile-time constants. Before this commit, some non-constant initializers were detected later in the C2C pass, but others were eliminated by the Cleanup pass before being checked, and yet others could cause the Rename pass to abort. To determine which variables are constant l-values, we leverage the recent addition of the Storage_auto storage class and base the determination on the storage class of the identifier: 'auto' or 'register' is not constant, the others are constant.
Diffstat (limited to 'cparser/Bitfields.ml')
0 files changed, 0 insertions, 0 deletions