diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-23 00:17:32 +0000 | 
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-23 00:17:32 +0000 | 
| commit | 1cfa8cdd122ec8868901ab2cb194fa6114a0eed6 (patch) | |
| tree | d5c3c68f7468b575405a5936763f83526baefb9f /gcc/cp/error.c | |
| parent | 4756477361c43ccdc177f47c39e43dd379d3a4ad (diff) | |
| download | ppe42-gcc-1cfa8cdd122ec8868901ab2cb194fa6114a0eed6.tar.gz ppe42-gcc-1cfa8cdd122ec8868901ab2cb194fa6114a0eed6.zip | |
	PR c++/9328
	* g++.dg/ext/typeof3.C: New test.
	PR c++/9328
	* error.c (dump_decl): For an OVERLOAD, just print the name of the
	function; it doesn't make sense to try to print its type.
	* semantics.c (finish_typeof): Issue errors about invalid uses.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
| -rw-r--r-- | gcc/cp/error.c | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/gcc/cp/error.c b/gcc/cp/error.c index d9bc5528ab8..d53943f3715 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -929,6 +929,25 @@ dump_decl (t, flags)        break;      case OVERLOAD: +      if (OVL_CHAIN (t)) +	{ +	  t = OVL_CURRENT (t); +	  if (DECL_CLASS_SCOPE_P (t)) +	    { +	      dump_type (DECL_CONTEXT (t), flags); +	      output_add_string (scratch_buffer, "::"); +	    } +	  else if (DECL_CONTEXT (t)) +	    { +	      dump_decl (DECL_CONTEXT (t), flags); +	      output_add_string (scratch_buffer, "::"); +	    } +	  dump_decl (DECL_NAME (t), flags); +	  break; +	} +       +      /* If there's only one function, just treat it like an ordinary +	 FUNCTION_DECL.  */        t = OVL_CURRENT (t);        /* Fall through.  */ | 

