|Subject:||[Tinycc-devel] RE :Re: Nevermind my previous comments. I just made an error.|
|Date:||Tue, 12 Jan 2016 11:39:20 +0100 (CET)|
----- message d'origine -----
De : "Vincent Lefevre" <address@hidden>
date mar. 12/01/2016 11:14 (GMT +01:00)
À : "address@hidden" <address@hidden>
Objet : Re: [Tinycc-devel] Nevermind my previous comments. I just made an error.
On 2016-01-11 20:49:53 -0700, address@hidden wrote:
> Vincent Lefevre <address@hidden> wrote:
> > IMHO, nowadays, it would be better for the user if compilers reject
> > implicit declaration of functions by default, since warnings can
> > easily remain unnoticed since an implicit declaration is an obvious
> > bug or at least very poor & non-standard coding.
> Coding styles have changed over the years. I don't disagree with you,
> but remember that there are millions of lines of C code out there,
> written who knows how long ago. Compilers have to support such
> code bases, which is why the C standard didn't disallow implicit
Implicit declarations dated back from K&R C, where prototypes were
not checked. Old code is not guaranteed to work with new compilers
anyway and may have security issues (which wasn't a problem in the
past). Rejecting implicit declarations would be safer in practice.
For compiling old code (which is still rather rare compared to the
usual use of compilers), a special option could be added, which the
user could choose if he doesn't want to clean up the code.
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Tinycc-devel mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|