James Dennett wrote: [...] > I'm aware that some do; I doubt that it's most, but I don't have hard > numbers to back that up. Well, the place where I work compiles the same piece of software on at least six different C compilers, including the appalling and ancient Visual Studio 6, and every single one of those supports noreturn annotations. We've found that a good way of producing robust code is to throw as much information at the compiler as possible; noreturn, printfalike, const, deprecated, sentinel, unused arguments, and unused results are all interesting, for example, and cause the compiler to emit more intelligent warnings than they would normally do. As the annotations are all indirected through macros it doesn't matter if the syntax is different from compiler to compiler or that some compilers don't support them all. -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "I have always wished for my computer to be as easy to use as my │ telephone; my wish has come true because I can no longer figure out │ how to use my telephone." --- Bjarne Stroustrup
Attachment:
signature.asc
Description: OpenPGP digital signature