[cfe-commits] [Patch] Tweak warning text for returning incomplete type from extern "C" functions

Hans Wennborg hans at chromium.org
Tue Jul 24 11:27:10 PDT 2012


On Tue, Jul 24, 2012 at 7:10 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> Sorry for being late with this, but since this is only maybe an issue, maybe
> it should have a sub-flag? -Wincomplete-return-type-c-linkage? Then again,
> -Wreturn-type-c-linkage is already fairly specific...

Yeah, it's annoying that it's warning about something that's only
maybe an issue, so I'm sure some users would appreciate the ability to
turn it off for this specific case.

There was quite a discussion on the list when the warning was added
originally. Are there more comments on whether the incomplete type
case of the warning should have its own flag?

 - Hans



> On Jul 24, 2012, at 11:00 , Hans Wennborg <hans at chromium.org> wrote:
>
> Thanks! Landed r160681.
>
> On Tue, Jul 24, 2012 at 6:04 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>
> Patch LGTM!
>
> ~Aaron
>
> On Tue, Jul 24, 2012 at 11:44 AM, Hans Wennborg <hans at chromium.org> wrote:
>
> Hi all,
>
> The attached patch tweaks the warning text for returning incomplete
> type from extern "C" functions.
>
> A warning was added in r150128 for returning non-C compatible
> user-defined types from functions with C linkage.
>
> This makes the text more clear for the case when the type isn't
> decidedly non-C compatible, but incomplete.
>
> Please take a look.
>
> Thanks,
> Hans
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>



More information about the cfe-commits mailing list