[Top][All Lists]

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

AIX with Visual Age C compiler fails to compile 2.1 and later

From: John P. Hartmann
Subject: AIX with Visual Age C compiler fails to compile 2.1 and later
Date: Tue, 4 Oct 2005 10:49:12 +0200


I can configure and build bison 2.0 on AIX with VAC, but not more recent

There are two problems, m4sugar.m4 is broken, and the examples directory
fails to compile (2.2 and on, I think).

The first problem is likely related to a change in m4sugar.m4 that you have
picked up. See


Autoconfig assumes that cc knows of a --version flag, which VAC does not.
Presumably this is the reason it decides that an AIX system with the Visual
Age C compiler (which is ANSI compliant) still needs to do K&R style
function prototypes, which causes the problem to bite. The change to m4sugar
generates a spurious semicolon before the function body (opening {) when a
function takes no parameters.

This causes bison not to build. If one fixes the problem in the c code in
the build, the problem still bites when one uses bison as m4 is used under
the covers now.

cc -DHAVE_CONFIG_H -DPKGDATADIR=\"/home/dk07282/share/bison\"
-DLOCALEDIR=\"/home/dk07282/share/locale\" -I. -I. -I.. -I../lib -I../lib -g
-c parse-gram.c
"parse-gram.c", line 1238.1: 1506-046 (S) Syntax error.

Line 1238 is the last one of these:

| yyparse. |

# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
yyparse (void)
yyparse ()

Running it through the preprocessor shows that it takes the #else path. That
is, the definition becomes "int yyparse(void) ; {..."



Attachment: txtK_vTbvOmiP.txt
Description: Text document

reply via email to

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