This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Fix sparc64 atomicity.h
- To: libstdc++ at gcc dot gnu dot org
- Subject: Fix sparc64 atomicity.h
- From: Andreas Jaeger <aj at suse dot de>
- Date: 19 Feb 2001 14:02:53 +0100
- Cc: gcc-patches at gcc dot gnu dot org
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