[Info-vax] VAX Macro to C conversion

Arne Vajhøj arne at vajhoej.dk
Thu Jul 11 17:00:29 EDT 2019


On 7/11/2019 1:43 PM, Simon Clubley wrote:
> On 2019-07-11, Bill Gunshannon <bill.gunshannon at gmail.com> wrote:
>> On 7/10/19 9:00 PM, Bill Gunshannon wrote:
>>>
>>> "The language understood by the Safe C Compiler is identical
>>>    to that understood by the standard C compilers."
>>>
>>> But, it had a lot of the checks people here keep arguing that C
>>> needs.  Array indexing, Stray Pointers, mismatched formal and
>>> actual parameters, Misuse of string functions, etc.
> 
> What is the most recent C compiler you have used ?
> 
> All C compilers I know of complain about mismatched parameters

Yes. I believe that is required by the C standard.

But same C standard has a little quirk.

void f()

does not mean "no parameters" - it means "any number of parameters",
which effectively disable the parameter check.

For the not C savvy then to get "no parameters" one has to use:

void f(void)

Note that I did not have this on my "problem list" as I really don't
think it is a common cause of problems. The only interesting point
is that C++ fixed it.

Arne



More information about the Info-vax mailing list