long overflows at LONG_MAX not at INT_MAX
authorMatthias Braun <matze@braunis.de>
Tue, 7 Jun 2011 10:41:42 +0000 (12:41 +0200)
committerMatthias Braun <matze@braunis.de>
Tue, 7 Jun 2011 10:41:42 +0000 (12:41 +0200)
ast2firm.c

index 1cc4195..53edbdd 100644 (file)
@@ -5103,7 +5103,7 @@ static void switch_statement_to_firm(switch_statement_t *statement)
                        default_proj_nr = l->last_case;
        }
 
-       if (default_proj_nr == INT_MAX) {
+       if (default_proj_nr == LONG_MAX) {
                /* Bad: an overflow will occur, we cannot be sure that the
                 * maximum + 1 is a free number. Scan the values a second
                 * time to find a free number.