User account creation filtered due to spam.

Bug 34516 - trivial sentinels
Summary: trivial sentinels
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.1
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 21:59 UTC by Mike Stump
Modified: 2007-12-23 19:13 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Stump 2007-12-17 21:59:40 UTC
Please implement http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01047.html

This is useful because previously, gcc-4.0.1 didn't warn about this case:

void f(void *last, ...) __attribute__((sentinel(0,1)));

main() {
  f((void*)0);
}

but gcc-4.2 does.  We have APIs that make use of the null being in the first argument and they used the sentinel check, but now clients get lots of warnings due to the `new' behavior.

We've added this to our compiler, just 49 lines...

radr://5631180
Comment 1 Andrew Pinski 2007-12-17 22:27:39 UTC
And why don't you submit it????
Comment 2 Steven Bosscher 2007-12-17 22:30:18 UTC
If you have added it to (*cough*) "your compiler", why don't you just submit it?

Oh wait.  Apple. Right...