On Mon, Apr 2, 2012 at 8:20 AM, Eli Friedman <[email protected]> wrote: > On Mon, Apr 2, 2012 at 7:01 AM, Tim Northover <[email protected]> wrote: >> Hi, >> >> C90 annoyingly requires a diagnostic to be produced for any type that ends up >> with two copies of the same type-qualifier. This warning is already produced >> for cases which can be detected during parsing, but when it happens via a >> typedef Sema needs to be involved. >> >> I believe this patch implements the correct note, though I was uncertain how >> best to test for C90 only compilation: is !C99 && !C++ & !ObjC correct? > > You don't need to check for Objective-C explicitly; it usually just > follows the rules for the corresponding C version. Otherwise, the > check is correct: you just need to check for not-C99 and not-C++. > > I don't see the point of the check for restrict; it isn't possible to > write "restrict" in C89 mode, and the standard doesn't constrain > __restrict. > > Does this patch do the right thing for array types? At first glace, > it looks like it doesn't.
Err, nevermind about array types; I expect that this does the right thing for such types. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
