Subject: The Function Prototypes Debate vs. C9X...
To: None <current-users@NetBSD.ORG>
From: Peter Seebach <seebs@solon.com>
List: current-users
Date: 02/16/1997 00:01:08
Just a heads up:

1.  Implicit int is *gone*.  It is not a feature of C9X; all objects must
have an implicit type.  For instance, in
	foo(a, b, c) {}
you must now write
	int foo(a, b, c) int a, b, c; {}
...

2.  Old-style function declarations are very, very likely to be gone; a straw
poll of voting members was roughly 10-4-3 (for/against/neutral) on the idea
of removing them from the language spec.

Currently, NetBSD depends to some extent on the happy fact that gcc
interprets
	void foo(float);
	void foo(x)
		float x;
	{
	}
as giving foo an argument type of "float"; this contradicts C89, which
maintains that the *definition* (the function body/header) claims foo
takes a double.

I am considering proposing this as a change in the language, for easier
merging of old code, but I doubt it will meet with any support.
Fundementally, the promotion rules are not what we want in C9X, and if
we *change* the promotion rules, we have introduced a Quiet Change, which
we prefer to avoid.

On the other hand, long long is being blessed... But it will have slightly
different semantics than the current one does, so we may need to watch out
for that.  (Specifically, a few of the promotion rules have been sanitized
to remove warts.)  Overall, this is a Good Thing for our conformance, although
probably a Bad Thing for the language.  There's also an <inttypes.h> which
has, among other things, "int64_t", which is a guaranteed exactly 64-bit
type.  I reccommend we consider migrating things towards this in cases
where what we mean is "N bits", rather than a specific name for a type.

If anyone (especially in core, but any other developers) has questions about
C9X, I'd be happy to try to answer them.  We are not able to distribute the
draft publically at this time, and it's too late to add features, but I'm
happy to try to help warn people about potential incompatabilities.

-s