no need to use alloca on C99
authorMatthias Braun <matze@braunis.de>
Wed, 24 Feb 2010 17:14:51 +0000 (17:14 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 24 Feb 2010 17:14:51 +0000 (17:14 +0000)
[r27217]

ast2firm.c

index 47430b5..ea749ac 100644 (file)
@@ -1295,7 +1295,7 @@ static ir_node *literal_to_firm(const literal_expression_t *literal)
                tv = new_tarval_from_str(string, size, mode);
                goto make_const;
        case EXPR_LITERAL_FLOATINGPOINT_HEXADECIMAL: {
-               char *buffer = alloca(size + 2);
+               char buffer[size + 2];
                memcpy(buffer, "0x", 2);
                memcpy(buffer+2, string, size);
                tv = new_tarval_from_str(buffer, size+2, mode);