parser.c (cp_lexer_start_debugging): Avoid arithmetic operations on boolean variables.
authorMark Mitchell <mark@codesourcery.com>
Tue, 8 Feb 2005 04:11:04 +0000 (04:11 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 8 Feb 2005 04:11:04 +0000 (04:11 +0000)
* parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
on boolean variables.
(cp_lexer_stop_debugging): Likewise.

From-SVN: r94731

gcc/cp/ChangeLog
gcc/cp/parser.c

index 32e664533d50928c7be97f891db6913abeacad95..5cb87420553453e6ef688a2e9d80ab16b68d1d6d 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-07  Mark Mitchell  <mark@codesourcery.com>
+
+       * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
+       on boolean variables.
+       (cp_lexer_stop_debugging): Likewise.
+
 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        PR c++/17401
index 82d665ed81044443b1ab56bf5b9247096fa4a308..54e330f737aedf852f480076fd9193dc978cb394 100644 (file)
@@ -706,7 +706,7 @@ cp_lexer_print_token (FILE * stream, cp_token *token)
 static void
 cp_lexer_start_debugging (cp_lexer* lexer)
 {
-  ++lexer->debugging_p;
+  lexer->debugging_p = true;
 }
 
 /* Stop emitting debugging information.  */
@@ -714,7 +714,7 @@ cp_lexer_start_debugging (cp_lexer* lexer)
 static void
 cp_lexer_stop_debugging (cp_lexer* lexer)
 {
-  --lexer->debugging_p;
+  lexer->debugging_p = false;
 }
 
 #endif /* ENABLE_CHECKING */