First C compiler ported to GCC
github.com
First C compiler ported to GCC
1–10 of 90 posts
Re: First C compiler ported to GCC
#2Re: First C compiler ported to GCC
#3Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
Re: First C compiler ported to GCC
#4Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
The type is not given at all, I think by default it would be "int".
Re: First C compiler ported to GCC
#5Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
Re: First C compiler ported to GCC
#6Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
Re: First C compiler ported to GCC
#7Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
https://en.cppreference.com/w/c/language/storage_duration
It was considered pretty useless by most, so c++11 recycled the keyword to mean something different.
Re: First C compiler ported to GCC
#8Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
"auto" probably is the storage class, it tells what kind of variable this is. Automatic as opposed to "register" which would force the variable to be a register, or "static" or "extern". The type is not given at all, I think by default it would be "int".
Yep, this is called the "implicit int" rule, and it was specifically outlawed[1] by C99 and onward.
[1] https://herbsutter.com/2015/04/16/reader-qa-why-was-implicit...
Re: First C compiler ported to GCC
#9Did this compiler really support "auto" as a variable type, as seen in example fizzbuzz ?
"auto" probably is the storage class, it tells what kind of variable this is. Automatic as opposed to "register" which would force the variable to be a register, or "static" or "extern". The type is not given at all, I think by default it would be "int".