tinycc-devel
[Top][All Lists]
Advanced

[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 12:49:58 +0100
User-agent: Mutt/1.5.24-6551-vl-r83103 (2016-01-05)

On 2016-01-12 10:38:18 +0000, Edmund Grimley Evans wrote:
> For example, the ANSI spec says: "If the function is defined with a
> type that does not include a prototype, and the types of the arguments
> after promotion are not compatible with those of the parameters after
> promotion, the behavior is undefined." Seeing as the old compiler was
> unable to check that condition (it involves comparing types between
> translation units), what are the chances of the programmer having got
> it right in all cases?

This is the problem of the programmer. There are good chances that
this will not work (except in particular cases, such as between char,
signed char and unsigned char), though the programmer and/or the user
may not see the problem immediately. But this is also a good reason
to require prototypes: this will help programmers to detect bugs.

-- 
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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]