Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Tom Lane writes:
>> Couldn't we just throw a prototyped function into that test program?

> The standard Autoconf prototype test is pretty involved (see
> AC_PROG_CC_STDC in /usr/local/share/autoconf/autoconf/c.m4 or whatever).

Yikes.  And that's really of zero value to us, since we already have all
that knowledge (about which CFLAGS to use per-platform) embedded in our
template files.

> Maybe you can come up with a smaller test for now that fails on the
> lame-excuse compiler on HP-UX?

It's not hard.

$ cat test.c
int test(int x)
{
        return x;
}
-- cc is the "good" compiler
$ cc -c test.c
cc: "test.c", line 1: error 1705: Function prototypes are an ANSI feature.
$ cc -Ae -c test.c
$
-- /usr/ccs/bin/cc is bogus
$ /usr/ccs/bin/cc -c test.c
(Bundled) cc: "test.c", line 1: error 1705: Function prototypes are an ANSI feature.
$ /usr/ccs/bin/cc -Ae -c test.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; 
ignored.
(Bundled) cc: "test.c", line 1: error 1705: Function prototypes are an ANSI feature.
$

> But: What's the error message going to be?  Is "compiler does not accept
> prototypes" going to be clearer for the user than what he gets now?

For sure.  See the discussion a day or two back --- with the bundled
compiler, the first sign of trouble is that configure fails to determine
the argument types for accept().  Not very helpful :-(

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to