Den 06/01/2011 kl. 20.56 skrev Tijl Coosemans:

> On Thursday 06 January 2011 09:01:09 Erik Cederstrand wrote:
>> Den 05/01/2011 kl. 20.36 skrev Jilles Tjoelker:
>>> On Wed, Jan 05, 2011 at 05:55:45PM +0100, Ulrich Spörlein wrote:
>>>> - get IPA to work with clang, or at least file a bug
>>>> - mark functions as __dead2 (please don't do that)
>>> 
>>> Why not?
>> 
>> Because the analyzer is supposed to find bugs. Only the function that
>> really doesn't return should be marked as such. If we begin spewing
>> __dead2's everywhere, it's bound to silence a valid bug somewhere
>> down the line when e.g. a conditional in a print_help() function is
>> changed subtly so it doesn't always reach exit().
> 
> On the other hand you can't really expect the compiler/analyser to know
> what a procedure in another file does, so in that case you need __dead2
> anyway. [...]

I have high expectations of LLVM :-) LLVM already has some knowledge of what's 
going on in other files (see LTO) so why shouldn't it be able to detect the 
__noreturn__ ? All the necessary information should be readily available.

Erik

Reply via email to