]> granicus.if.org Git - flex/commitdiff
yy_flex_debug extern only if not C++
authorVern Paxson <vern@ee.lbl.gov>
Sun, 5 Mar 1995 16:37:34 +0000 (16:37 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Sun, 5 Mar 1995 16:37:34 +0000 (16:37 +0000)
gen.c

diff --git a/gen.c b/gen.c
index 1d2c2829a57ac8ed2788c9a63fb56f9d8c63ebaa..f78af88b6c59954fd406f239a100e8505b77bee7 100644 (file)
--- a/gen.c
+++ b/gen.c
@@ -1155,8 +1155,11 @@ void make_tables()
 
        if ( ddebug )
                { /* Spit out table mapping rules to line numbers. */
-               indent_puts( "extern int yy_flex_debug;" );
-               indent_puts( "int yy_flex_debug = 1;\n" );
+               if ( ! C_plus_plus )
+                       {
+                       indent_puts( "extern int yy_flex_debug;" );
+                       indent_puts( "int yy_flex_debug = 1;\n" );
+                       }
 
                out_str_dec( long_align ? C_long_decl : C_short_decl,
                        "yy_rule_linenum", num_rules );