* c.opt (-fdeduce-init-list): Off by default.
From-SVN: r180728
This commit is contained in:
parent
a7d5d7e221
commit
15694fdd6d
4 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,7 @@
|
||||||
2011-10-31 Jason Merrill <jason@redhat.com>
|
2011-10-31 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* c.opt (-fdeduce-init-list): Off by default.
|
||||||
|
|
||||||
PR c++/50920
|
PR c++/50920
|
||||||
* c-common.h (cxx_dialect): Add cxx11 and cxx03.
|
* c-common.h (cxx_dialect): Add cxx11 and cxx03.
|
||||||
* c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
|
* c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
|
||||||
|
|
|
@ -752,8 +752,8 @@ C ObjC C++ ObjC++
|
||||||
Emit debug annotations during preprocessing
|
Emit debug annotations during preprocessing
|
||||||
|
|
||||||
fdeduce-init-list
|
fdeduce-init-list
|
||||||
C++ ObjC++ Var(flag_deduce_init_list) Init(1)
|
C++ ObjC++ Var(flag_deduce_init_list) Init(0)
|
||||||
-fno-deduce-init-list disable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list
|
-fdeduce-init-list enable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list
|
||||||
|
|
||||||
fdefault-inline
|
fdefault-inline
|
||||||
C++ ObjC++ Ignore
|
C++ ObjC++ Ignore
|
||||||
|
|
|
@ -1907,9 +1907,9 @@ to @var{n}. A limit is needed to detect endless recursion during
|
||||||
constant expression evaluation. The minimum specified by the standard
|
constant expression evaluation. The minimum specified by the standard
|
||||||
is 512.
|
is 512.
|
||||||
|
|
||||||
@item -fno-deduce-init-list
|
@item -fdeduce-init-list
|
||||||
@opindex fno-deduce-init-list
|
@opindex fdeduce-init-list
|
||||||
Disable deduction of a template type parameter as
|
Enable deduction of a template type parameter as
|
||||||
std::initializer_list from a brace-enclosed initializer list, i.e.
|
std::initializer_list from a brace-enclosed initializer list, i.e.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
@ -1924,9 +1924,10 @@ void f()
|
||||||
@}
|
@}
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
This option is present because this deduction is an extension to the
|
This deduction was implemented as a possible extension to the
|
||||||
current specification in the C++0x working draft, and there was
|
originally proposed semantics for the C++11 standard, but was not part
|
||||||
some concern about potential overload resolution problems.
|
of the final standard, so it is disabled by default. This option is
|
||||||
|
deprecated, and may be removed in a future version of G++.
|
||||||
|
|
||||||
@item -ffriend-injection
|
@item -ffriend-injection
|
||||||
@opindex ffriend-injection
|
@opindex ffriend-injection
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// supported by the working draft, but is necessary for perfect forwarding
|
// supported by the working draft, but is necessary for perfect forwarding
|
||||||
// of initializer-lists to things that can take a std::initializer_list.
|
// of initializer-lists to things that can take a std::initializer_list.
|
||||||
|
|
||||||
// { dg-options -std=c++0x }
|
// { dg-options "-std=c++0x -fdeduce-init-list" }
|
||||||
// { dg-do run }
|
// { dg-do run }
|
||||||
|
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
|
Loading…
Add table
Reference in a new issue