[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 02:52:54 +0100 |
User-agent: |
Mutt/1.5.24-6551-vl-r83103 (2016-01-05) |
On 2016-01-11 05:44:11 +0200, Aharon Robbins wrote:
> C++ does reject the call. C is much more permissive. Try
>
> $ cat > hello.c
> int main() { printf("hello, world\n"); return 0; }
> ^D
With the -pedantic-errors option (whose goal is to reject non-ISO
programs), gcc rejects the code. This seems to be a change in C99,
because the code is not rejected with -ansi -pedantic-errors.
By default, gcc doesn't reject the code, but emits a warning, which
is better than nothing. Well, tcc emits a warning too.
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.
--
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 <=
- 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, 2016/01/12
- 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