C++ PATCH: PR 20599 (variadic templates, take two) (2/4)
Douglas Gregor
doug.gregor@gmail.com
Tue Sep 19 14:54:00 GMT 2006
This patch addresses PR c++/20599 by introducing support for variadic
templates:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20599
This is a revised version of the patch posted previously. It
addresses several bugs in the original patch and includes changes to
libstdc++ that use variadic templates for the implementation of
Library TR1 tuples and function objects. In particular, the changes
from the first patch are:
- Warn about variadic templates by default; -Wno-variadic-templates
turns off this warning.
- Support printing parameter packs in function types (for error
messages)
- Support for nested expansion of parameter packs.
- Tighter error checking.
More information about variadic templates is available here:
http://www.generic-programming.org/~dgregor/cpp/variadic-
templates.html
This is part 2 of 4. It contains all of the command-line option
handling and documentation.
Tested on mainline with powerpc-apply-darwin8.7.0 and i686-pc-linux-
gnu; no new regressions. All new tests pass.
Doug Gregor
Open Systems Lab @ Indiana University
2006-09-19 Douglas Gregor <doug.gregor@gmail.com>
PR c++/20599
* c-common.c (warn_variadic_templates): New.
* c-common.h (warn_variadic_templates): Declare.
* c-cppbuiltin.c (c_cpp_builtins): Define __VARIADIC_TEMPLATES
when we aren't complaining about them.
* c-opts.c (c_common_handle_option): Handle
-W(no-)variadic-templates.
(c_common_post_options): By default, do warn about variadic
templates.
* c.opt: Add -W(no-)variadic templates.
* doc/cpp.texi: Document __VARIADIC_TEMPLATES macro.
* doc/invoke.texi: Document -W(no-)variadic-templates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vt-gcc-trunk-v2.patch
Type: application/octet-stream
Size: 4847 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20060919/c739c95f/attachment.obj>
More information about the Libstdc++
mailing list