🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1161

Re: ANSI/ISO standard (surprisingly enough!) & extensions

#1161
From: Sean Eric Fagan
Date: Thu, 20 Aug 1992 20:50
52 lines
2551 bytes
In article <1992Aug19.234812.11723@unix.brighton.ac.uk> amn@vms.brighton.ac.uk writes:
>1   It is only applicable to compilers that include a complete ANSI library,
>    often not the case when targetting embedded systems, ...

Not true:  there are several parts to the PH suite, one which tests the
compiler, and one which tests the compiler-plus-libraries (as well as
possible other parts; it's been a long time since I've seen the suite).

>2   It does not check that system constants (#define's) and function prototypes
>    are in the correct header files, ...

Uhm, yes, it does.  It can do things like:

	char *cp;

	main() { if (cp == NULL) return 0; else return 1; }

That will fail.  It can also include a header file, and reference all of the
constants, types, and functions that are supposed to be in that header file.
Remember:  the PH suite checks for things that *should* fail, as well as
things that should pass!

>3   It does not ensure that the compiler defaults to ANSI compliant mode, with
>    language extensions being available only as an option.

That is an implementation detail, and I can guarantee that there are *few*
compilers which will *default* to ANSI:  it's too limited.  One of the
things you configure the PH suite to do is to invoke the compiler the way
you want it to be;

>4   It does not prevent tampering with the input (PH) files to get the desired
>    output.

Nothing will.  Get real.  However, if you claim ANSI conformance, based on
passing the PH test suite, and a customer gets your compiler, and runs it
thruogh the suite, and it fails, don't you think someone is going to make a
bit of noise about that?

>5   It does not reject compilers that accept invalid operations or illegal
>    syntax.

Yes, it does.

>6   It does not test typesafe linkage, where implemented :-)

Not required by ANSI.

-- 
Sean Eric Fagan  | "You can't get lost in in one room, no matter how
sef@kithrup.COM  |  little effort you make to learn your way around."
-----------------+    -- William E Davidsen (william@crd.GE.COM)
Any opinions expressed are my own, and generally unpopular with others.
Technical Details
Message-ID: <1992Aug20.205031.10606@kithrup.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!hoptoad!kithrup!sef
References: <1992Aug19.234812.11723@unix.brighton.ac.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!sparky!uunet!hoptoad!kithrup!sef
From: sef@kithrup.COM (Sean Eric Fagan)
Subject: Re: ANSI/ISO standard (surprisingly enough!) & extensions
Organization: Kithrup Enterprises, Ltd.
Date: Thu, 20 Aug 1992 20:50:31 GMT
Message-ID: <1992Aug20.205031.10606@kithrup.COM>
References: <1992Aug19.234812.11723@unix.brighton.ac.uk>
Lines: 52