X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/2a4647a32f3de7eda80133370b05cea9f72e5761..98ae96438ebb4465c777a7849f1b4ca222e760e3:/data/c.m4?ds=inline diff --git a/data/c.m4 b/data/c.m4 index 604ad138..b0221e8e 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -96,7 +96,6 @@ m4_define([b4_parse_param], b4_parse_param)) - ## ------------ ## ## Data Types. ## ## ------------ ## @@ -232,7 +231,7 @@ m4_define([b4_token_enums_defines], # ---------------------------------------------------------- # Declare the function NAME. m4_define([b4_c_function_def], -[#if defined (__STDC__) || defined (__cplusplus) +[#if defined (__STDC__) || defined (__C99__FUNC__) || defined (__cplusplus) b4_c_ansi_function_def($@) #else $2 @@ -342,7 +341,6 @@ m4_define([b4_c_arg], ## Synclines. ## ## ----------- ## - # b4_syncline(LINE, FILE) # ----------------------- m4_define([b4_syncline], @@ -382,8 +380,9 @@ m4_define_default([b4_yydestruct_generate], [static void], [[const char *yymsg], [yymsg]], [[int yytype], [yytype]], - [[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([, - [[YYLTYPE *yylocationp], [yylocationp]]]))[ + [[YYSTYPE *yyvaluep], [yyvaluep]][]dnl +b4_location_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl +m4_ifset([b4_parse_param], [, b4_parse_param]))[ { YYUSE (yyvaluep); ]b4_location_if([ YYUSE (yylocationp); @@ -414,13 +413,14 @@ m4_define_default([b4_yysymprint_generate], ]$1([yysymprint], [static void], - [[FILE *yyoutput], [yyoutput]], - [[int yytype], [yytype]], - [[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([, - [[YYLTYPE *yylocationp], [yylocationp]]])) + [[FILE *yyoutput], [yyoutput]], + [[int yytype], [yytype]], + [[const YYSTYPE * const yyvaluep], [yyvaluep]][]dnl +b4_location_if([, [[const YYLTYPE * const yylocationp], [yylocationp]]])[]dnl +m4_ifset([b4_parse_param], [, b4_parse_param]))[ { YYUSE (yyvaluep); -b4_location_if([ YYUSE (yylocationp); +]b4_location_if([ YYUSE (yylocationp); ])dnl [ if (yytype < YYNTOKENS) @@ -443,5 +443,5 @@ b4_location_if([ YYUSE (yylocationp); break; } YYFPRINTF (yyoutput, ")"); -} -]]) +}]dnl +])