Fix sparc64 atomicity.h

Andreas Jaeger aj@suse.de
Mon Feb 19 05:02:00 GMT 2001


I received the following error while building libstdc++ on the
gcc-3_0-branch:

In file included from ../../../../libstdc++-v3/include/bits/basic_string.h:37,
                 from ../../../../libstdc++-v3/include/bits/std_string.h:44,
                 from ../../../../libstdc++-v3/src/stdexcept.cc:34:
../include/bits/atomicity.h: In function `int __compare_and_swap(volatile long 
   int*, long int, long int)':
../include/bits/atomicity.h:65: parse error before `register'
../include/bits/atomicity.h:77: `__tmp2' undeclared (first use this function)
../include/bits/atomicity.h:77: (Each undeclared identifier is reported only 
   once for each function it appears in.)

Here's a patch.  Ok to commit on both branches?

Andreas

2001-02-19  Andreas Jaeger  <aj@suse.de>

	* config/cpu/sparc/sparc64/bits/atomicity.h (__compare_and_swap):
	Fix typo.

============================================================
Index: libstdc++-v3/config/cpu/sparc/sparc64/bits/atomicity.h
--- libstdc++-v3/config/cpu/sparc/sparc64/bits/atomicity.h	2000/08/22 18:24:16	1.3
+++ libstdc++-v3/config/cpu/sparc/sparc64/bits/atomicity.h	2001/02/19 13:01:46
@@ -1,5 +1,5 @@
 /* Low-level functions for atomic operations.  Sparc64 version.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -61,7 +61,7 @@
 __attribute__ ((__unused__))
 __compare_and_swap (volatile long *__p, long __oldval, long __newval)
 {
-  register int __tmp, 
+  register int __tmp;
   register long __tmp2;
 
   __asm__ __volatile__("1:	ldx	[%4], %0\n\t"

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Libstdc++ mailing list