[cfe-commits] Patch improving parse of tuple in 98-mode

Chandler Carruth chandlerc at google.com
Sun Jan 23 01:15:29 PST 2011


I was trying to see how Clang in -std=c++98 would handle libc++ and ran into
some trouble. GCC enables a substantial amount of C++ functionality when
inside of system headers in addition to suppressing warnings. Clang however
only suppresses warnings and relies on 0x features to be enabled with
ExtWarns in 98 mode in order for them to work in system headers. The end
result is that while Clang is fine with the variadic templates, it barfs on
several other constructs. One is the use of 'vector<vector<int>>'-style
closing angle brackets. I've attached a patch, constructed with our fixit
rewriter, that makes all of those contain the mandated space. Chris
indicated on IRC that this should likely just be avoided in libc++.

The other major blocker is that R-value references aren't an extension but
are used heavily in libc++. Should these also become an extension, or should
we add more robust survival tactics in system headers much as GCC does?

One more small blocker was the use of default template parameter arguments
in function templates. Same question as to how best to proceed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110123/d3bae45b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_close_angle_angle.patch
Type: application/octet-stream
Size: 10553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110123/d3bae45b/attachment.obj>

More information about the cfe-commits mailing list