History

allow c11 feature only when -std=c11 is use

matthias gatto committed 7 years ago

Commit 756988e1 parent a3a29172 files · +11 −1Browse files

Unified · Split

2 files
  1. tccgen.c +5 −0
  2. tests/tests2/Makefile +6 −1
tccgen.c+5−0
@@ -4890,6 +4890,9 @@ ST_FUNC void unary(void) · 4889 unmodified lines
4890 case TOK_ALIGNOF1:4890 case TOK_ALIGNOF1:
4891 case TOK_ALIGNOF2:4891 case TOK_ALIGNOF2:
4892 case TOK_ALIGNOF3:4892 case TOK_ALIGNOF3:
4893 if (tcc_state->cversion != 201112 &&
4894 tok == TOK_ALIGNOF3)
4895 goto tok_identifier;
4893 t = tok;4896 t = tok;
4894 next();4897 next();
4895 in_sizeof++;4898 in_sizeof++;
@@ -5099,6 +5102,8 @@ ST_FUNC void unary(void) · 203 unmodified lines
5099 TokenString *str = NULL;5102 TokenString *str = NULL;
5100 int saved_const_wanted = const_wanted;5103 int saved_const_wanted = const_wanted;
5101 5104
5105 if (tcc_state->cversion != 201112)
5106 goto tok_identifier;
5102 next();5107 next();
5103 skip('(');5108 skip('(');
5104 const_wanted = 0;5109 const_wanted = 0;
tests/tests2/Makefile+6−1
@@ -42,11 +42,16 @@ NORUN = · 41 unmodified lines
4242_function_pointer.test : NORUN = true4242_function_pointer.test : NORUN = true
43 43
44# Some tests might need different flags44# Some tests might need different flags
4533_ternary_op.test : FLAGS += -std=c11
46
45FLAGS =47FLAGS =
4676_dollars_in_identifiers.test : FLAGS += -fdollars-in-identifiers4876_dollars_in_identifiers.test : FLAGS += -fdollars-in-identifiers
47 49
48# These tests run several snippets from the same file one by one50# These tests run several snippets from the same file one by one
4960_errors_and_warnings.test : FLAGS += -dt5160_errors_and_warnings.test : FLAGS += -dt -std=c11
52
5394_generic.test : FLAGS += -std=c11
54
5096_nodata_wanted.test : FLAGS += -dt5596_nodata_wanted.test : FLAGS += -dt
51 56
52# Always generate certain .expects (don't put these in the GIT),57# Always generate certain .expects (don't put these in the GIT),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t