fix warnings and remove unnecessary current_ir_graph setting
authorMatthias Braun <matze@braunis.de>
Fri, 12 Mar 2010 19:05:29 +0000 (19:05 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 12 Mar 2010 19:05:29 +0000 (19:05 +0000)
[r27294]

driver/firm_opt.c
lexer.c
parser.c

index c907a71..df88e61 100644 (file)
@@ -394,7 +394,6 @@ static bool do_irg_opt(ir_graph *irg, const char *name)
        if (! (config->flags & OPT_FLAG_ENABLED))
                return false;
 
-
        old_irg          = current_ir_graph;
        current_ir_graph = irg;
 
@@ -639,8 +638,6 @@ static void do_firm_lowering(const char *input_filename)
                for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
                        ir_graph *irg = get_irp_irg(i);
 
-                       current_ir_graph = irg;
-
                        do_irg_opt(irg, "local");
                        do_irg_opt(irg, "gcse");
                        do_irg_opt(irg, "opt-load-store");
diff --git a/lexer.c b/lexer.c
index 99dd4e6..111bc6d 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1657,15 +1657,15 @@ void lexer_open_buffer(const char *buffer, size_t len, const char *input_name)
 #if 0 // TODO
        bufpos = buffer;
        bufend = buffer + len;
+
+       /* place a virtual \n at the beginning so the lexer knows that we're
+        * at the beginning of a line */
+       c = '\n';
 #else
        (void)buffer;
        (void)len;
        panic("builtin lexing not done yet");
 #endif
-
-       /* place a virtual \n at the beginning so the lexer knows that we're
-        * at the beginning of a line */
-       c = '\n';
 }
 
 void exit_lexer(void)
index cf9273e..7a2f0cd 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -9420,14 +9420,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