On Mon, 7 Jan 2008 10:31:53 -0800 (PST) Christoph Lameter <clameter@sgi.com> wrote:sounds like a bad idea; a compile time failure is of course nicer than a runtime failure for the cases we can find the bug at compile-time already. We should however investigate using one of the two following gcc function attributes; they can give the user a lot better diagnostic information than what we have right now: error ("message") If this attribute is used on a function declaration and a call to such a function is not eliminated through dead code elimination or other optimizations, an error which will include message will be diagnosed. This is useful for compile time checking, especially together with __builtin_constant_p and inline functions where checking the inline function arguments is not possible through extern char [(condition) ? 1 : -1]; tricks. While it is possible to leave the function undefined and thus invoke a link failure, when using this attribute the problem will be diagnosed earlier and with exact location of the call even in presence of inline functions or when not emitting debugging information. warning ("message") If this attribute is used on a function declaration and a call to such a function is not eliminated through dead code elimination or other optimizations, a warning which will include message will be diagnosed. This is useful for compile time checking, especially together with __builtin_constant_p and inline functions. While it is possible to define the function with a message in .gnu.warning* section, when using this attribute the problem will be diagnosed earlier and with exact location of the call even in presence of inline functions or when not emitting debugging information. -- If you want to reach me at my work email, use arjan@linux.intel.com For development, discussion and tips for power savings, visit http://www.lesswatts.org --
| Rafael J. Wysocki | [Bug #11355] Regression in 2.6.27-rc2 when cross-building the kernel |
| David Miller | [GIT]: Networking |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
| Artem Bityutskiy | [PATCH 11/22 take 3] UBI: user-interfaces unit |
git: | |
| David Symonds | Re: I don't want the .git directory next to my code. |
| Petr Baudis | [ANNOUNCE] TopGit - A different patch queue manager |
| Daniel Barkalow | Non-http dumb protocols |
| Kevin Ballard | Re: git on MacOSX and files with decomposed utf-8 file names |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Linus Benedict Torvalds | Trying to answer ... |
| Linus Torvalds | Re: mget / mput = bad director components |
| Gerard A. Allan | BUG REPORT --- call chsvga (really call getkey) |
| c l | site-to-site vpn 4.0 to cisco 3000 |
| Darren Spruell | Re: OpenBSD as Virtualbox guest |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
