r277862 - in /trunk/gcc/cp: ChangeLog constexpr...

jason@gcc.gnu.org jason@gcc.gnu.org
Tue Nov 5 23:50:00 GMT 2019


Author: jason
Date: Tue Nov  5 23:50:08 2019
New Revision: 277862

URL: https://gcc.gnu.org/viewcvs?rev=277862&root=gcc&view=rev
Log:
Various small C++ changes.

Wrappers for lookup_qualified_name and build_x_binary_op to make calling
them more convenient in places, and a function named contextual_conv_bool
for places that want contextual conversion to bool.

I noticed that we weren't showing the declaration location when we complain
about a call to a non-constexpr function where a constant expression is
required.

If maybe_instantiate_noexcept doesn't actually instantiate, there's no
reason for it to mess with clones.

	* constexpr.c (explain_invalid_constexpr_fn): Show location of fn.

	* pt.c (maybe_instantiate_noexcept): Only update clones if we
	instantiated.

	* typeck.c (contextual_conv_bool): New.

	* name-lookup.c (lookup_qualified_name): Add wrapper overload taking
	C string rather than identifier.
	* parser.c (cp_parser_userdef_numeric_literal): Use it.
	* rtti.c (emit_support_tinfos): Use it.
	* cp-tree.h (ovl_op_identifier): Change to inline functions.
	(build_x_binary_op): Add wrapper with fewer parms.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/name-lookup.h
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/rtti.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/cp/typeck2.c



More information about the Gcc-cvs mailing list