%s/may not/must not/.
[cparser] / parser.c
index 724b3f6..826ddd9 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -228,11 +228,11 @@ static void semantic_comparison(binary_expression_t *expression);
        case '~':                         \
        case T_ANDAND:                    \
        case T_CHARACTER_CONSTANT:        \
-       case T_INTEGER:                   \
-       case T_INTEGER_OCTAL:             \
-       case T_INTEGER_HEXADECIMAL:       \
        case T_FLOATINGPOINT:             \
        case T_FLOATINGPOINT_HEXADECIMAL: \
+       case T_INTEGER:                   \
+       case T_INTEGER_HEXADECIMAL:       \
+       case T_INTEGER_OCTAL:             \
        case T_MINUSMINUS:                \
        case T_PLUSPLUS:                  \
        case T_STRING_LITERAL:            \
@@ -253,8 +253,8 @@ static void semantic_comparison(binary_expression_t *expression);
        case T___builtin_isunordered:     \
        case T___builtin_offsetof:        \
        case T___builtin_va_arg:          \
-       case T___builtin_va_start:        \
        case T___builtin_va_copy:         \
+       case T___builtin_va_start:        \
        case T___func__:                  \
        case T___noop:                    \
        case T__assume:                   \
@@ -1967,7 +1967,7 @@ static bool walk_designator(type_path_t *path, const designator_t *designator,
                                        type_t *real_type = skip_typeref(iter->declaration.type);
                                        if (real_type->kind == TYPE_BITFIELD) {
                                                errorf(&designator->source_position,
-                                                      "offsetof designator '%Y' may not specify bitfield",
+                                                      "offsetof designator '%Y' must not specify bitfield",
                                                       symbol);
                                                goto failed;
                                        }
@@ -5941,7 +5941,7 @@ static type_t *parse_typename(void)
                /* TODO: improve error message, user does probably not know what a
                 * storage class is...
                 */
-               errorf(HERE, "typename may not have a storage class");
+               errorf(HERE, "typename must not have a storage class");
        }
 
        type_t *result = parse_abstract_declarator(specifiers.type);
@@ -6119,14 +6119,17 @@ static expression_t *parse_number_literal(void)
        case T_INTEGER:
                kind = EXPR_LITERAL_INTEGER;
                check_integer_suffix();
+               type = type_int;
                break;
        case T_INTEGER_OCTAL:
                kind = EXPR_LITERAL_INTEGER_OCTAL;
                check_integer_suffix();
+               type = type_int;
                break;
        case T_INTEGER_HEXADECIMAL:
                kind = EXPR_LITERAL_INTEGER_HEXADECIMAL;
                check_integer_suffix();
+               type = type_int;
                break;
        case T_FLOATINGPOINT:
                kind = EXPR_LITERAL_FLOATINGPOINT;
@@ -9152,7 +9155,9 @@ static asm_argument_t *parse_asm_arguments(bool is_out)
                                       "asm output argument is not an lvalue");
                        }
 
-                       if (argument->constraints.begin[0] == '+')
+                       if (argument->constraints.begin[0] == '=')
+                               determine_lhs_ent(expression, NULL);
+                       else
                                mark_vars_read(expression, NULL);
                } else {
                        mark_vars_read(expression, NULL);
@@ -9418,14 +9423,8 @@ static statement_t *parse_label_statement(void)
        eat(':');
 
        if (token.type == '}') {
-               /* TODO only warn? */
-               if (warning.other && false) {
-                       warningf(HERE, "label at end of compound statement");
-                       statement->label.statement = create_empty_statement();
-               } else {
-                       errorf(HERE, "label at end of compound statement");
-                       statement->label.statement = create_invalid_statement();
-               }
+               errorf(HERE, "label at end of compound statement");
+               statement->label.statement = create_invalid_statement();
        } else if (token.type == ';') {
                /* Eat an empty statement here, to avoid the warning about an empty
                 * statement after a label.  label:; is commonly used to have a label