[cfe-commits] [PATCH] Warn on duplicate const specifier

Aaron Ballman aaron at aaronballman.com
Tue Aug 28 12:00:05 PDT 2012


This patch addresses PR13705 by turning the extension diagnostic into
its own warning group (-Wduplicate-decl-specifiers).  This helps
programmers catch const problems with code that likely doesn't behave
the way they expect it to.

This causes the following to warn, even though it's legal (depending
on what spec you're compiling against):

const char const *x;

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dup-spec.patch
Type: application/octet-stream
Size: 3623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120828/5d6b9bb4/attachment.obj>


More information about the cfe-commits mailing list