[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: Both: s/std::stderr/stderr/
From: |
Paul Eggert |
Subject: |
Re: FYI: Both: s/std::stderr/stderr/ |
Date: |
Fri, 4 Jan 2002 17:23:16 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> Date: 03 Jan 2002 10:49:09 +0100
>
> * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
> The ISO C++ standard is extremely clear about it: stderr is
> considered a macro, not a regular symbol (see table 94 `Header
> <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
> Therefore std:: does not apply to it. It still does with fprintf.
> Also, s/cstdio.h/cstdio/.
Looks good. (Nice to have C++ experts in the house. :-)
I installed the following patch to bison.texinfo to bring it up to date
with the above patch.
2002-01-04 Paul Eggert <address@hidden>
* doc/bison.texinfo (Debugging):
Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.37.2.13
diff -p -u -r1.37.2.13 bison.texinfo
--- doc/bison.texinfo 17 Dec 2001 18:47:11 -0000 1.37.2.13
+++ doc/bison.texinfo 5 Jan 2002 00:52:46 -0000
@@ -4935,13 +4935,13 @@ Alternatively, use the @samp{-t} option
you always define @code{YYDEBUG} so that debugging is always possible.
The trace facility outputs messages with macro calls of the form
address@hidden (YYSTDERR, @var{format}, @var{args})} where
address@hidden (stderr, @var{format}, @var{args})} where
@var{format} and @var{args} are the usual @code{printf} format and
arguments. If you define @code{YYDEBUG} to a nonzero value but do not
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
-and the macros are defined to @code{fprintf} and @code{stderr}. In
-the same situation, C++ parsers include @code{<cstdio.h>} instead, and
-use @code{std::fprintf} and @code{std::stderr}.
+and @code{YYPRINTF} is defined to @code{fprintf}. In the same
+situation, C++ parsers include @code{<cstdio>} and use
address@hidden::fprintf} instead.
Once you have compiled the program with trace facilities, the way to
request a trace is to store a nonzero value in the variable @code{yydebug}.