bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with YYDEBUG and C++


From: Potthoff, Kay
Subject: Problems with YYDEBUG and C++
Date: Thu, 5 Sep 2002 10:30:47 +0200

Hello,
 
I'm not shure if this is really a bug, but I think perhaps some corrective action is preferrable.
 
I tried to compile my bison stuff with the C++ compiler and got an error:
 
    # bison -d -v -t parser.yxx
    # mv y.tab.c parser.cxx
    # c++ -Wall -g -DYYDEBUG=1 -c parser.cxx -I.
 
    y.tab.c: In function `int yyparse()':
    y.tab.c: 388: too many arguments to function `char* getenv()'
 
I have taken a look into the produced sources and have seen that first there is a forward declaration of getenv():
 
    extern char* getenv();
 
but later then getenv() is used with one argument:
 
    ... getenv("YYDEBUG") ...
 
This is ok for a C-compiler but my C++-compiler don't like this. By the way, if I compile with YYDEBUG=0 then the C++-compiler runs without any complains.
 
The version of bison is 1.28, the version of gcc is 3.0.
 
Regards, Kay
 
######################################################
# Kay Potthoff              Senior Software Engineer
#
# FORCE Computers GmbH        Tel.: +49-89-60814-356
# Lilienthalstrasse 15                    FAX : +49-89-6097793
# 85579 Neubiberg/München
# Deutschland/Germany
#
# mailto:address@hidden
######################################################

 

Attachment: Potthoff, Kay.vcf
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]