Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!occrsh!uokmax!rmtodd
From: rmtodd@uokmax.UUCP
Newsgroups: comp.os.minix
Subject: problems in make, /lib/cpp
Message-ID: <623@uokmax.UUCP>
Date: Sat, 11-Jul-87 00:27:27 EDT
Article-I.D.: uokmax.623
Posted: Sat Jul 11 00:27:27 1987
Date-Received: Sun, 12-Jul-87 07:38:11 EDT
Reply-To: rmtodd@uokmax.UUCP (Richard Michael Todd)
Organization: University of Oklahoma, Norman
Lines: 37
Keywords: make, cpp
Summary: UNIX incompatibilities and outright bug

1.  The MINIX make does not handle makefiles correctly which have macro
substitutions included in macro definitions, e.g.
SRCS2 = foo.c
SRCS = bar.c baz.c $(SRCS2)
I've seen makefiles for software on full UNIX systems use this feature with
no problems, so it must be a fault in the MINIX make.c (not running the line
thru the macro expander or something like that).

2.  A good deal of C software out there uses the "#if defined(word)" 
preprocessor feature.  /lib/cpp doesn't, and the error messages it gives
on encountering it aren't exactly crystal-clear as to their meaning and
cause.

3. An outright bug in /lib/cpp.  Try compiling this program on your MINIX
machine:
-------------
main() {
	printf("foo"");
}
-------------
It does, as you can see, have an unmatched quote.  One would expect an
error message complaining about a quote mismatch.  What one does get is
a stream of error messages about how it expected ')', ';', and '}', which
is at least understandable if you are familiar with how many compilers work.
What isn't understandable is why the C compiler also complains about non-ASCII
characters in the input.  You certainly didn't put any there.  For further
enlightenment, run the program just through cpp, with a command line like:
	/lib/cpp foo.c
and look at the output.  You will see a bunch of non-ASCII garbage dumped
out at the end of the pre-processor output, and it looks like part of the
cpp code itself is getting output.  This is ungood.
(Granted one shouldn't make such stupid mistakes in one's code, but one
doesn't expect the compiler to fail so drastically on bogus input.)
--------------------------------------------------------------------------
Richard Todd
USSnail:820 Annie Court,Norman OK 73069
UUCP: {allegra!cbosgd|ihnp4}!okstate!uokmax!rmtodd