[Info-vax] Rust as a HS language, was: Re: Quiet?
Arne Vajhøj
arne at vajhoej.dk
Sun Apr 10 11:29:26 EDT 2022
On 4/10/2022 9:43 AM, Bill Gunshannon wrote:
> On 4/9/22 20:35, Arne Vajhøj wrote:
>> 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.
>
> Trivial programs, probably. I just tried to compile a couple pieces
> of the Ultrix-11 3.1 source with gcc and after over 100 warnings and
> 4 errors in a 1000 line piece of code it just stops.
OK.
But what are the problems?
Arne
More information about the Info-vax
mailing list