From 6e9438cf7cd774fff78aab39f18f756c6a67a112 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Thu, 8 Oct 1998 16:04:13 +0000 Subject: [PATCH] semantics.c (finish_asm_stmt): Revert my 1998-09-28 change. * semantics.c (finish_asm_stmt): Revert my 1998-09-28 change. From-SVN: r22924 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/semantics.c | 34 ++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7f78050ba27..046dd43063d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 8 15:58:30 1998 Anthony Green + + * 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 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 9579d44d96b..aa7f2aa9742 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -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 (); } }