On Friday 18 January 2008 11:31:05 am Zan Lynx wrote:Oh, absolutely. The problem, however, is that very very few people actually use these function attributes in their code. Heck, we don't even use the standard restrict keyword, much less gcc-specific function annotations. I think that one part of the problem is because gcc seems to have had attribute diarrhea -- I know of noone who can recite more than 10% of the available attributes without glancing at the documentation. The other part of the problem is that gcc does no sanity checks on the provided attributes. For example, the code below compiles perfectly fine without a peep, even with -Wall and -Wextra. int global; void foobar(const int *x) __attribute__((const)); void foobar(const int *x) { if (*x) *(int *)x = 7; global = 11; } *grumble, grumble* :-) -- Vadim Lobanov --
| Linus Torvalds | Linux 2.6.21-rc4 |
| Jens Axboe | [PATCH 0/8] IO queuing and complete affinity |
| Nicholas A. Bellinger | Re: Integration of SCST in the mainstream Linux kernel |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Ingo Molnar | Re: [crash] BUG: unable to handle kernel NULL pointer dereference at 0000000000000... |
| Gerrit Renker | [PATCH 19/37] dccp: Header option insertion routine for feature-negotiation |
| Gary Thomas | Marvell 88E609x switch? |
| Jamie Lokier | Re: silent semantic changes with reiser4 |
| Jan Kara | [PATCH 10/16] ext4: Remove syncing logic from ext4_file_write |
| Jack Stone | Re: Versioning file system |
| Jens Axboe | [PATCH 8/8] vm: Add an tuning knob for vm.max_writeback_pages |
