This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Fix up DW_AT_explicit handling (PR debug/56563)


Hi!

Say on
struct S { explicit S () {}; } s;
struct T { explicit T (int x) {}; } t(2);
struct U { explicit operator int () { return 6; } } u;
G++ mysteriously emits DW_AT_explicit only on T::T(int) and not
on S::S() nor U::operator int().

Fixed thusly, ok for trunk?

2014-02-19  Jakub Jelinek  <jakub@redhat.com>

	PR debug/56563
	* cp-objcp-common.c (cp_function_decl_explicit_p): Remove
	FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.

--- gcc/cp/cp-objcp-common.c.jj	2014-01-02 23:50:57.000000000 +0100
+++ gcc/cp/cp-objcp-common.c	2014-02-19 15:13:05.576141197 +0100
@@ -160,7 +160,6 @@ bool
 cp_function_decl_explicit_p (tree decl)
 {
   return (decl
-	  && FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node
 	  && DECL_LANG_SPECIFIC (STRIP_TEMPLATE (decl))
 	  && DECL_NONCONVERTING_P (decl));
 }

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]