semantics.c (finish_asm_stmt): Revert my 1998-09-28 change.
authorAnthony Green <green@cygnus.com>
Thu, 8 Oct 1998 16:04:13 +0000 (16:04 +0000)
committerAnthony Green <green@gcc.gnu.org>
Thu, 8 Oct 1998 16:04:13 +0000 (16:04 +0000)
* semantics.c (finish_asm_stmt): Revert my 1998-09-28
change.

From-SVN: r22924

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 7f78050ba2759bbb440dddb1824df3d8c4035bf1..046dd43063d8de5191725ee9c81d86ca41209570 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
+
+       * semantics.c (finish_asm_stmt): Revert my 1998-09-28
+       change.
+
 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
 
        * typeck.c (unsigned_type): Only return TItype nodes when
index 9579d44d96b089768e628882787a71c84d9e174a..aa7f2aa974223838b84b6bb4af39a92f432a352b 100644 (file)
@@ -730,19 +730,29 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
   else
     {
       emit_line_note (input_filename, lineno);
-
-      if (cv_qualifier != NULL_TREE
-         && cv_qualifier != ridpointers[(int) RID_VOLATILE])
-       cp_warning ("%s qualifier ignored on asm",
-                   IDENTIFIER_POINTER (cv_qualifier));
+      if (output_operands != NULL_TREE || input_operands != NULL_TREE
+           || clobbers != NULL_TREE)
+       {
+         if (cv_qualifier != NULL_TREE
+             && cv_qualifier != ridpointers[(int) RID_VOLATILE])
+           cp_warning ("%s qualifier ignored on asm",
+                       IDENTIFIER_POINTER (cv_qualifier));
+         
+         c_expand_asm_operands (string, output_operands,
+                                input_operands, 
+                                clobbers,
+                                cv_qualifier 
+                                == ridpointers[(int) RID_VOLATILE],
+                                input_filename, lineno);
+       }
+      else
+       {
+         if (cv_qualifier != NULL_TREE)
+           cp_warning ("%s qualifier ignored on asm",
+                       IDENTIFIER_POINTER (cv_qualifier));
+         expand_asm (string);
+       }
       
-      c_expand_asm_operands (string, output_operands,
-                            input_operands, 
-                            clobbers,
-                            cv_qualifier 
-                            == ridpointers[(int) RID_VOLATILE],
-                            input_filename, lineno);
-
       finish_stmt ();
     }
 }