[cfe-commits] [Patch] Warn about incompatible typedef of standard library type
Eli Friedman
eli.friedman at gmail.com
Tue Dec 6 14:29:34 PST 2011
On Tue, Dec 6, 2011 at 2:06 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Tue, Dec 6, 2011 at 12:01 PM, Eli Friedman <eli.friedman at gmail.com>
> wrote:
>>
>> It's pretty much worthless as-is; normally, the typedef for size_t etc
>> is in a system header, and the warning won't trigger there.
>
>
> I think you're missing the (potential) purpose of this: broken user code. I
> would imagine this is to catch users who improperly provide their own
> typedef rather than including the header.
Does this actually happen in practice?
> I don't think it is intended to
> warn when the system header happens to be broken.
I've seen broken system headers multiple times on the cfe-dev; I've
never seen users explicitly declare size_t in real-world code.
-Eli
More information about the cfe-commits
mailing list