On Thu, Feb 9, 2012 at 3:04 PM, Chandler Carruth <[email protected]> wrote: > On Thu, Feb 9, 2012 at 12:42 PM, Matt Beaumont-Gay <[email protected]> > wrote: >> >> On a different note, what do you think about not warning when the >> return type is incomplete? It's a little surprising that we warn on >> this: >> >> struct foo; >> extern "C" { struct foo get_foo(void); } >> struct foo { }; > > > I think that's a bug. Incomplete struct types are relatively common as > "opaque" return types.
A function type with an incomplete return type is essentially opaque in the sense that it's impossible to call; it doesn't generally make sense for an interface to expose something like that. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
