This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: asm volatile



Greg wrote:
> scwm-constraints.hpp:71: warning: volatile qualifier ignored on asm
> 
> I did not get such warnings from egcs-1.01 thru 1.03a, so something must
> have changed.  I'm not sure if this is a bug in egcs, or if it's a
> change in its guarantees.  If egcs is not buggy on this point, then the
> SCM_FENCE may need to be expanded away to nothing to avoid the warning
> and we need to be sure that something else is preventing code motion as
> SCM_FENCE is intended to do.

Greg - the following g++ patch (which I have committed to egcs) should
fix the problem:

Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/ChangeLog,v
retrieving revision 1.699
diff -c -r1.699 ChangeLog
*** ChangeLog	1998/09/28 17:34:27	1.699
--- ChangeLog	1998/09/29 03:18:42
***************
*** 1,3 ****
--- 1,7 ----
+ 1998-09-28  Anthony Green  <green@cygnus.com>
+ 
+ 	* semantics.c (finish_asm_stmt): Always permit volatile asms.
+ 
  1998-09-28  Mark Mitchell  <mark@markmitchell.com>
  
  	* decl.c (grokdeclarator): Tighten checks for invalid
Index: semantics.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/semantics.c,v
retrieving revision 1.30
diff -c -r1.30 semantics.c
*** semantics.c	1998/09/07 14:25:29	1.30
--- semantics.c	1998/09/29 03:18:42
***************
*** 730,757 ****
    else
      {
        emit_line_note (input_filename, lineno);
!       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);
! 	}
  
        finish_stmt ();
      }
--- 730,747 ----
    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));
!       
!       c_expand_asm_operands (string, output_operands,
! 			     input_operands, 
! 			     clobbers,
! 			     cv_qualifier 
! 			     == ridpointers[(int) RID_VOLATILE],
! 			     input_filename, lineno);
  
        finish_stmt ();
      }


AG

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California