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

Arne Vajhøj arne at vajhoej.dk
Sat Apr 9 20:35:47 EDT 2022


On 4/9/2022 6:09 PM, John Dallman wrote:
> 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.

In that case I think most K&R C code should compile with ANSI C.

Arne






More information about the Info-vax mailing list