Bug 53231 - libatomic/tas_n.c:100:10: error: 'ret' undeclared (first use in this function)
Summary: libatomic/tas_n.c:100:10: error: 'ret' undeclared (first use in this function)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-04 12:07 UTC by John David Anglin
Modified: 2012-05-22 23:56 UTC (History)
0 users

See Also:
Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
Build: hppa-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2012-05-04 12:07:16 UTC
/bin/bash ./libtool --tag=CC   --mode=compile /home/dave/gnu/gcc/objdir/./gcc/xg
cc -B/home/dave/gnu/gcc/objdir/./gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-li
nux-gnu/bin/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/lib/ -isystem /ho
me/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/include -isystem /home/dave/opt/gnu
/gcc/gcc-4.8.0/hppa-linux-gnu/sys-include    -DHAVE_CONFIG_H -I../../../gcc/liba
tomic/config/posix -I../../../gcc/libatomic -I.    -Wall -Werror  -pthread -g -O
2 -MT tas_1_.lo -MD -MP -MF .deps/tas_1_.lo.Ppo -DN=1  -c -o tas_1_.lo ../../../
gcc/libatomic/tas_n.c
yes
checking for struct stat.st_blocks... libtool: compile:  /home/dave/gnu/gcc/objd
ir/./gcc/xgcc -B/home/dave/gnu/gcc/objdir/./gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.
8.0/hppa-linux-gnu/bin/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/lib/ -
isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/include -isystem /home/d
ave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/sys-include -DHAVE_CONFIG_H -I../../../
gcc/libatomic/config/posix -I../../../gcc/libatomic -I. -Wall -Werror -pthread -
g -O2 -MT tas_1_.lo -MD -MP -MF .deps/tas_1_.lo.Ppo -DN=1 -c ../../../gcc/libato
mic/tas_n.c  -fPIC -DPIC -o .libs/tas_1_.o
../../../gcc/libatomic/tas_n.c: In function 'libat_test_and_set_1':
../../../gcc/libatomic/tas_n.c:100:10: error: 'ret' undeclared (first use in thi
s function)
   return ret != 0;
          ^
../../../gcc/libatomic/tas_n.c:100:10: note: each undeclared identifier is repor
ted only once for each function it appears in
   return ret != 0;
          ^
../../../gcc/libatomic/tas_n.c:88:17: error: unused variable 'newval' [-Werror=unused-variable]
   UTYPE oldval, newval;
                 ^
../../../gcc/libatomic/tas_n.c:88:9: error: variable 'oldval' set but not used [-Werror=unused-but-set-variable]
   UTYPE oldval, newval;
         ^
../../../gcc/libatomic/tas_n.c:101:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
make[4]: *** [tas_1_.lo] Error 1
make[4]: Leaving directory `/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libatomic'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libatomic'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libatomic'
make[1]: *** [all-target-libatomic] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 1 John David Anglin 2012-05-04 12:10:17 UTC
Also occurs on hppa64-hp-hpux11.11.
Comment 2 John David Anglin 2012-05-22 23:54:36 UTC
Author: danglin
Date: Tue May 22 23:54:32 2012
New Revision: 187783

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187783
Log:
	PR other/53231
	* tas_n.c (libat_test_and_set): Correct return.  Remove unused variable.


Modified:
    trunk/libatomic/ChangeLog
    trunk/libatomic/tas_n.c
Comment 3 John David Anglin 2012-05-22 23:56:54 UTC
Fixed.