[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Nevermind my previous comments. I just made an error.
From: |
Vincent Lefevre |
Subject: |
Re: [Tinycc-devel] Nevermind my previous comments. I just made an error. |
Date: |
Tue, 12 Jan 2016 11:13:52 +0100 |
User-agent: |
Mutt/1.5.24-6551-vl-r83103 (2016-01-05) |
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
> declarations.
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] Nevermind my previous comments. I just made an error., Ben Hutchinson, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Christian Jullien, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Vincent Lefevre, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., arnold, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Vincent Lefevre, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Aharon Robbins, 2016/01/10
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Vincent Lefevre, 2016/01/11
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., arnold, 2016/01/11
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error.,
Vincent Lefevre <=
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Edmund Grimley Evans, 2016/01/12
- Re: [Tinycc-devel] Nevermind my previous comments. I just made an error., Vincent Lefevre, 2016/01/12