WG21/N0238;X3J16/93-0051 Thomas Plum Plum Hall Inc, #261 PO Box 111333 plum@plumhall.com Kamuela HI 96743 USA 808-882-1255 FAX 808-882-1556 [new] Re: Array of unknown bound 1. The type ``array of unknown bound of T'' must be part of the type system. For example, it is required for extern int a[]; . Refer to such an array as an "incomplete array type". 2. However, the full set of "compatible type" rules from C will create a problem in C++. Shopiro suggested the following example which is valid in C but dangerous (under any set of rules) in C++: file 1: extern int a[]; typedef int UNKA[]; void f(UNKA*); ... f(&a); file 2: int a[N] = {0}; typedef int AN[N]; void f(AN*); ... f(&a); In C, the two invocations of f must resolve to the same function f , but this is impossible in C++. 3. Functions with a pointer-to-incomplete-array parameter pose a problem for "name-mangling" schemes in some systems, as reported by Gibbons. 4. Given that the C/C++ behaviors must differ in some way, where should we draw the line? If functions with pointer-to-incomplete-array parameter are prohibited (with diagnostic required), a C programmer would be guaranteed of an explicit diagnostic for a program whose behavior might change in C++. If such functions are allowed in C++, there will be incompatibility situations whose diagnosis relies upon the (currently unresolved) diagosis requirements for the one-definition rule. Therefore I propose the following additional requirement upon function declarations, which is to be in the "diagnostic required" category: If the type of a function parameter includes a type of the form "pointer to array of unknown bound of T", the program is ill-formed. [Or use "Required Diagnostics", as determined editorially.] 5. The current rules for standard conversions prohibit some conversions which are valid in ISO C. This should be noted in Chapter 19. Example: extern int a[]; typedef int AN[N]; AN *p = &a; /* valid in ISO C, invalid in C++ */ 6. Some members may want to impose additional requirements. These can be proposed and added later.