projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecbd5c5
)
Make stray ; outside of functions an error in strict mode.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 18 Sep 2008 22:30:18 +0000
(22:30 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 18 Sep 2008 22:30:18 +0000
(22:30 +0000)
[r22102]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
14a84c4
..
5f76904
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-9984,10
+9984,12
@@
static void parse_translation_unit(void)
return;
case ';':
- /* TODO error in strict mode */
- warningf(HERE, "stray ';' outside of function");
- next_token();
- break;
+ if (!strict_mode) {
+ warningf(HERE, "stray ';' outside of function");
+ next_token();
+ break;
+ }
+ /* FALLTHROUGH */
default:
errorf(HERE, "stray %K outside of function", &token);