error.c (dump_function_decl): Print no space between `ptr-operator' the `type-specifi...
authorGabriel Dos Reis <gdr@codesourcery.com>
Thu, 26 Oct 2000 05:50:19 +0000 (05:50 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Thu, 26 Oct 2000 05:50:19 +0000 (05:50 +0000)
cp/
* error.c (dump_function_decl): Print no space between
`ptr-operator' the `type-specifier' of the return type.
(dump_type_prefix): Make sure we put space at the appropriate
place.

testuite/g++.old-deja/g++.pt/
* g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparaison
operands.

From-SVN: r37067

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C

index f7c2344c3ca036a4049343dc51a80f4323e843be..8e63deafb6d77717f3a7d7b9c14cde6eb70749e5 100644 (file)
@@ -1,3 +1,10 @@
+2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
+
+       * error.c (dump_function_decl): Print no space between
+       `ptr-operator' the `type-specifier' of the return type.
+       (dump_type_prefix): Make sure we put space at the appropriate
+       place. 
+
 2000-10-23  Jason Merrill  <jason@redhat.com>
 
        * call.c (equal_functions): Also call decls_match for extern "C" fns.
index e5cbe37f109206c04ba2af6a5c7de5bfb5c77f22..91c9f6e9f06a4767a8b2660b448f81cc7630ae4a 100644 (file)
@@ -717,13 +717,14 @@ dump_type_prefix (t, flags)
           so let the OFFSET_TYPE case handle it.  */
        if (!TYPE_PTRMEM_P (t))
          {
-           if (padding != none)
-             output_add_space (scratch_buffer);
            if (TREE_CODE (sub) == ARRAY_TYPE)
-             print_left_paren (scratch_buffer);
+              {
+                output_add_space (scratch_buffer);
+                print_left_paren (scratch_buffer);
+              }
             output_add_character
               (scratch_buffer, "&*"[TREE_CODE (t) == POINTER_TYPE]);
-           padding = dump_qualifiers (t, none);
+           padding = dump_qualifiers (t, before);
          }
       }
       break;
@@ -1268,8 +1269,8 @@ dump_function_decl (t, flags)
                   && !DECL_DESTRUCTOR_P (t);
   if (show_return)
     {
-      if (dump_type_prefix (TREE_TYPE (fntype), flags) != none)
-        output_add_space (scratch_buffer);
+      dump_type_prefix (TREE_TYPE (fntype), flags);
+      output_add_space (scratch_buffer);
     }
 
   /* Print the function name.  */
index 3c75d3c2ddf94bb2c45e06298111a9d21f38e97e..72755e7a4e496e8514ff81300cd72eb5c8d316ce 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
+
+       * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparaison
+       operands. 
+
 2000-10-25  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gcc.dg/qual-return-1.c, gcc.dg/qual-return-2.c: New tests.
index 756ed3ef854280f6fd9d5531d540ec904c0f602e..0e5ebcd5eb6a7aff266fa571654044ab94b698be 100644 (file)
@@ -18,7 +18,7 @@ const char* S3<char>::h(int) { return __PRETTY_FUNCTION__; }
 int main()
 {
   if (strcmp (S3<double>::h(7), 
-             "const char *S3<T>::h(U) [with U = int, T = double]") == 0)
+             "const charS3<T>::h(U) [with U = int, T = double]") == 0)
     return 0;
   else 
     return 1;