Path: csiph.com!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: strong types in c - (safety samples)
Date: Sun, 11 Feb 2024 20:38:38 -0800
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <867cja47qp.fsf@linuxsc.com>
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="354d2f36c9690da15a8ae0972e0ffebc"; logging-data="1444547"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YL8tZ4nlC4nO6wUb7vKxGX5oSstJH5gA="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:ZeTHNFx6eM7FGYtpWFo8GLcr00U= sha1:P9xY4AaNJZEzAkTEiACYIWPxaPo=
Xref: csiph.com comp.lang.c:382366
Thiago Adams writes:
> Consider:
>
> void f(int i);
>
> enum E {A};
>
> int main(){
> f(A); //cake will have a warning here
> }
>
>
> I will create a diagnostic in cake for this and others.
> Basically I will respect the standard where it says enumerators are
> int, but I will create a strict mode where this and other types of
> conversion happens.
>
>
> int main(){
> f(true); //cake will have a warning here
> f('A'); //not sure this one..
> }
>
> the same for enums.
This is comp.lang.c. Please take any discussions of languages
other than C to a venue where those discussions are topical,
such as comp.lang.misc.