diff options
author | Michael Forney <mforney@mforney.org> | 2019-05-12 15:37:10 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-05-12 15:45:35 -0700 |
commit | e70ee0ec1a0f7784dac638ac2d782afec4dd7a4c (patch) | |
tree | 826e0e24fc93c1973c96cfaaffc4224357065ed4 /test/conditional-compound-literal.c | |
parent | f7b471b8576846e575f8c73ef6b70c4b06ff377d (diff) |
eval: Keep track of kind of constant expression we are evaluating
When we are evaluating an arithmetic constant expression, we don't want
to indroduce static data definitions for string or compound literals.
Fixes #59.
Diffstat (limited to 'test/conditional-compound-literal.c')
-rw-r--r-- | test/conditional-compound-literal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/conditional-compound-literal.c b/test/conditional-compound-literal.c new file mode 100644 index 0000000..33a5416 --- /dev/null +++ b/test/conditional-compound-literal.c @@ -0,0 +1,4 @@ +int main(void) { + int x = 0, *p = 0 ? 0 : &(int){x}; + return *p; +} |