Permalink
Browse files

[imcc] Fix and add -Wlogical-op test in imcparser.c

The disallow bareword method names check in sub_label_op
was bailing out on ' only, but skipped ".
Thanks to dcb314. Closing #1015
  • Loading branch information...
1 parent e8eebc0 commit 4d0deaf4459045b13e6373d6947ae59a2a8b8ae9 @rurban rurban committed Oct 26, 2013
Showing with 4 additions and 5 deletions.
  1. +2 −0 ChangeLog
  2. +2 −2 compilers/imcc/imcc.y
  3. +0 −3 config/auto/warnings.pm
View
2 ChangeLog
@@ -1,6 +1,8 @@
2013-11-19 release 5.10.0
- Core
+ + Fixed bareword method names check for " in imcc [GH #1015]
- Build
+ + Removed wrong -Wlogical-op exception for imcparser.c [GH #1015]
- Documentation
- Tests
- Community
View
4 compilers/imcc/imcc.y
@@ -2124,10 +2124,10 @@ the_sub:
/* disallow bareword method names; SREG name constants are fine */
const char * const name = $3->name;
if (!($3->type & VTREG)) {
- if (*name != '\'' || *name != '\"')
+ if (*name != '\'' && *name != '\"')
IMCC_fataly(imcc, EXCEPTION_SYNTAX_ERROR,
"Bareword method name '%s' not allowed in PIR",
- $3->name);
+ $name);
}
imcc->cur_obj = $1;
View
3 config/auto/warnings.pm
@@ -233,9 +233,6 @@ sub _init {
'-Wcast-qual' => [ qw(
compilers/imcc/imcparser.c
) ],
- '-Wlogical-op' => [ qw(
- compilers/imcc/imcparser.c
- ) ],
};
# add at the end
$gcc->{'override'} = $gpp->{'override'} = {

0 comments on commit 4d0deaf

Please sign in to comment.