[Info-vax] Rust as a HS language, was: Re: Quiet?

John Dallman jgd at cix.co.uk
Sat Apr 9 18:10:00 EDT 2022


In article <6251fe92$0$696$14726298 at news.sunsite.dk>, arne at vajhoej.dk
(Arne Vajhøj) wrote:

> But are you saying that an ANSI C compiler also supports the
> old style function?

At least some of them do. The compiler I had handy was on Windows, Visual
Studio 2019. I just compiled this:

#include <stdio.h>
int main( argc, argv)
int argc;
char *argv[];
{
	int i;
	printf( "Hello, world\n");
	for( i = 1; i < argc; i++)
	{
		printf( "argument %d is '%s'\n", i, argv[i]); 
	}
}

With this command line:

    cl /W4 /MD /std:c11 /Za kr_world.c
    
/W4             All the warnings. 
/MD             Use the DLL form of the run-time library. 
/std:c11        Compile according to the C2011 standard.
/Za             Be pedantic about standard compliance. 

It compiles with one warning, about the use of an old-style declarator,
and runs correctly. 
       


John 



More information about the Info-vax mailing list