Hi!
> > int
> > main(void)
> > {
> > tst_brkm(TCONF, NULL, "gcc is dumb");
> > }
>
> Well, that's the whole reason for attribute __noreturn__. The compiler
> is not smart enough and it's not easy to make it smarter, without a buch
> of matematicians and a lot of work. And as such code leads, usually, to
> bug, the gcc folks rather prints the warning. There are even parts of
> gcc compiler, that are compiled with warnings disabled...
Thinking of this again, even a bunch of matematicians wouldn't help
here. As the compiler doesn't have any means to find out, when main is
compiled, how tst_brkm() is actually implemented. That is not possible
before the linker comes into play and in case of dynamic linker, this
warning could be generated only at runtime. That's IMHO the whole reason
for attribute __noreturn__.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list