2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
gcc/cp
* cp/mangle.c (write_template_arg_literal): Handle nullptr
mangling.
gcc
* common.opt (-fabi-version): Document =14.
* doc/invoke.texi (C++ Dialect Options): Likewise.
gcc/c-family
* c-opts.c (c_common_post_options): Update
latest_abi_version.
libiberty
* cp-demangle.c (d_expr_primary): Handle
nullptr demangling.
* testsuite/demangle-expected: Added test.
From-SVN: r277801
16 lines
381 B
C
16 lines
381 B
C
// PR c++/91979
|
|
// { dg-do compile { target c++11 } }
|
|
// { dg-final { scan-assembler "_Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE" } }
|
|
|
|
template <bool, typename T = void>
|
|
struct enable_if {};
|
|
|
|
template <typename T>
|
|
struct enable_if<true, T> { typedef T type; };
|
|
|
|
template <void *P>
|
|
void foo(typename enable_if<P == nullptr>::type* = 0) {}
|
|
|
|
template void foo<(void *)0>(void *);
|
|
|