On 07/20/2010 08:33 AM, Douglas Gregor wrote: > Author: dgregor > Date: Tue Jul 20 09:33:20 2010 > New Revision: 108837 > > URL: http://llvm.org/viewvc/llvm-project?rev=108837&view=rev > Log: > Complain when string literals are too long for the active language > standard's minimum requirements. > > Modified: > cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td > cfe/trunk/lib/Lex/LiteralSupport.cpp > cfe/trunk/test/Lexer/c90.c > > Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=108837&r1=108836&r2=108837&view=diff > ============================================================================== > --- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original) > +++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Tue Jul 20 09:33:20 > 2010 > @@ -94,7 +94,10 @@ > def err_pascal_string_too_long : Error<"Pascal string is too long">; > def warn_octal_escape_too_large : ExtWarn<"octal escape sequence out of > range">; > def warn_hex_escape_too_large : ExtWarn<"hex escape sequence out of range">; > - > +def ext_string_too_long : Extension<"string literal of length %0 exceeds" > + "maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required > to " > + "support">;
C++ doesn't really have a minimum required length, just a recommendation. Does that make the error useless in C++? Sean _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
