]> granicus.if.org Git - flex/commitdiff
Flex generates C99 defs now.
authorJohn Millaway <john43@users.sourceforge.net>
Thu, 5 Sep 2002 18:21:04 +0000 (18:21 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Thu, 5 Sep 2002 18:21:04 +0000 (18:21 +0000)
Documented the above change in manual.

flex.skl
flex.texi

index a81f1ecc699d9ed0eca71e4c1db5aae566e7c978..ee337d86fceb84465091997d6a6abefb3fc47e77 100644 (file)
--- a/flex.skl
+++ b/flex.skl
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <stdint.h>
 /* end standard C headers. */
 %+
 /* begin standard C++ headers. */
 #else  /* ! __cplusplus */
 
 /* We're not in a C++ compiler, so by default,
-   we generate traditional function defs, unless you explicitly ask
-   for C99 defs. */
-
-#ifndef YY_NO_TRADITIONAL_FUNC_DEFS
-#ifndef YY_TRADITIONAL_FUNC_DEFS
-#define YY_TRADITIONAL_FUNC_DEFS
-#endif
-#endif
+   we generate C99 function defs, unless you explicitly ask
+   for traditional defs by defining YY_TRADITIONAL_FUNC_DEFS */
 
 #if __STDC__
 
index 81c7e2802cedd45c92e549a0e042f90a03439868..bee6a8460463cfeb0c8fb1a59b248a422f39b174 100644 (file)
--- a/flex.texi
+++ b/flex.texi
@@ -1427,13 +1427,15 @@ and taking two floats as arguments.  Note that if you give arguments to
 the scanning routine using a K&R-style/non-prototyped function
 declaration, you must terminate the definition with a semi-colon (;).
 
-@code{flex} generates K&R-style function definitions by default. This is solely
-to support bootstrapping gcc on old systems. Worse, it prevents us from using
-any standard data types smaller than int (such as short, char, or bool) as
-function arguments. For this reason, future versions of @code{flex} may
-generate standard C99 code, leaving K&R-style functions to the historians.
-Currently, if you want C99 definitions, then you'll have to define
-@code{YY_NO_TRADITIONAL_FUNC_DEFS}.
+@code{flex} generates @samp{C99} function definitions by default. However flex
+does have the ability to generate obsolete, er, @samp{traditional}, function
+definitions. This is to support bootstrapping gcc on old systems.
+Unfortunately, traditional definitions prevent us from using any standard data
+types smaller than int (such as short, char, or bool) as function arguments.
+For this reason, future versions of @code{flex} may generate standard C99 code
+only, leaving K&R-style functions to the historians.  Currently, if you do
+@strong{not} want @samp{C99} definitions, then you must define
+@code{YY_TRADITIONAL_FUNC_DEFS}.
 
 @cindex stdin, default for yyin
 Whenever @code{yylex()} is called, it scans tokens from the global input