Only copy necessary characters for bare labels

This commit is contained in:
ISSOtm
2020-03-26 23:10:51 +01:00
parent caddd61f17
commit 187f88aa50

View File

@@ -669,8 +669,11 @@ line : label
scoped_label_bare : T_LABEL {
warning(WARNING_OBSOLETE, "Non-local labels without a colon are deprecated");
strcpy($$, $1);
}
| T_LOCAL_ID {
strcpy($$, $1);
}
| T_LOCAL_ID
;
scoped_label : T_LABEL ':' {
strcpy($$, $1);