[Top][All Lists]

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

MacOS CW Pro 5 compile of Bison-1.28

From: Hans Aberg
Subject: MacOS CW Pro 5 compile of Bison-1.28
Date: Thu, 28 Sep 2000 17:18:47 +0200

I was able to compile Bison-1.28 for MacOS using the Metrowerks CW Pro 5
C-compiler, and then use the output .c file produced from an input .y file.
The config.h file was obtained by editing the config.hin file by hand.
Compiler settings was essentially ANSI, but with some extensions in order
to facilitate MacOS compilations.

I do not have access to "diff" under MacOS, so you get brief explanations

Some bugs:

-- It seems that file "bison.simple" (or "bison.s1" as it is called in the
distribution) uses malloc(), free() without including the ISO C header

-- Several files had included <config.h> instead of the correct "config.h".

-- mktemp() is not ISO C, so I substituted tmpnam(). Then one has to open
each new file before calling tmpnam() again, because ISO C only guarantees
name conflicts against existing files.

-- The temporary files were not deleted after the run of Bison -- but
perhaps this is a feature, not a bug.

-- _nl_explode_name() and perhaps at some other places, had some illegal
implicit type conversions, like
  (const char *) -> (const unsigned char *)
In addition, names starting with underscore or having a double underscore
are normally reserved for the implementation of the compiler (at least in

-- When editing the config.hin file by hand, it says "define LABEL if ...",
whereas the use in the code fails to use the label in the form
"defined(LABEL)", instead only using it directly as "LABEL". (Perhaps you
use autoconfig which defines them to 1, so this formal error has not been
noticed because of that.)

-- The labels GNULOCALEDIR, LOCALE_ALIAS_PATH were not defined (probably
supplied by the makefile then).

-- There were two main(), in main.c and ansi2knr.c. This is not a problem
when using a makefile, but when using a project file, it becomes confusing.

  Hans Aberg
                  * Email: Hans Aberg <mailto:address@hidden>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>

reply via email to

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