diff options
| author | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-31 17:46:06 +0000 |
|---|---|---|
| committer | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-31 17:46:06 +0000 |
| commit | ed6762c8d835d1044f766b6db24d2f211a8a5a2c (patch) | |
| tree | f4cdbaa7c394a3e32c8931850b6a06c5753ca828 | |
| parent | 2117200e915887e7922a5625dfaa842cf5a5a392 (diff) | |
| download | ppe42-gcc-ed6762c8d835d1044f766b6db24d2f211a8a5a2c.tar.gz ppe42-gcc-ed6762c8d835d1044f766b6db24d2f211a8a5a2c.zip | |
* error.c (dump_template_decl): Output template parameters
together with their specifiers.
Output `class' prefix for template template parameter.
(dump_decl): Fix formatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45329 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/error.c | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c44c8098546..8dc0b86f5e2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * error.c (dump_template_decl): Output template parameters + together with their specifiers. + Output `class' prefix for template template parameter. + (dump_decl): Fix formatting. + 2001-08-30 Kurt Garloff <garloff@suse.de> * optimize.c (inlinable_function_p): Allow only smaller single diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 05352c2733c..8907858ee3a 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1034,7 +1034,7 @@ dump_decl (t, flags) break; case TEMPLATE_DECL: - dump_template_decl (t, flags); + dump_template_decl (t, flags); break; case TEMPLATE_ID_EXPR: @@ -1115,6 +1115,11 @@ dump_template_decl (t, flags) int len = TREE_VEC_LENGTH (inner_parms); output_add_string (scratch_buffer, "template<"); + + /* If we've shown the template prefix, we'd better show the + parameters' and decl's type too. */ + flags |= TFF_DECL_SPECIFIERS; + for (i = 0; i < len; i++) { if (i) @@ -1125,10 +1130,12 @@ dump_template_decl (t, flags) output_add_space (scratch_buffer); } nreverse(orig_parms); - /* If we've shown the template<args> prefix, we'd better show the - decl's type too. */ - flags |= TFF_DECL_SPECIFIERS; + + if (DECL_TEMPLATE_TEMPLATE_PARM_P (t)) + /* Say `template<arg> class TT' not just `template<arg> TT'. */ + output_add_string (scratch_buffer, "class "); } + if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == TYPE_DECL) dump_type (TREE_TYPE (t), ((flags & ~TFF_CLASS_KEY_OR_ENUM) | TFF_TEMPLATE_NAME |

