[PATCH/RFA] Fix gcc.c-torture/execute/960218-1.c on NetBSD
law@redhat.com
law@redhat.com
Fri Jun 7 14:51:00 GMT 2002
In message <20020607101014.A11012@dr-evil.shagadelic.org>, Jason R Thorpe write
s:
>
> --dWYAkE0V1FpFQHQ3
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
>
> The gcc.c-torture/execute/960218-1.c test uses a global variable
> called "glob". On many Unix systems, this shadows the libc function
> glob(3).
>
> Normally this isn't a problem, but NetBSD's libc has two versions of
> glob(3), one of which generates a warning when referenced:
>
> /amd/yeah-baby/u1/hack/gnu-toolchain/gcc/gcc/gcc/testsuite/gcc.c-torture/exe
> cute/960218-1.c(.text+0x28): warning: reference to compatibility glob(); inc
> lude <glob.h> for correct reference
>
> The attached patch renames the offending variable in the test, which
> eliminates the linker warning, thus making the test pass on NetBSD.
>
> OK to commit to trunk and 3.1 branch?
>
> * testsuite/gcc.c-torture/execute/960218-1.c: Rename variable
> "glob" to "globl".
Or have the code in dejagnu filter out the message -- that's what we typically
do with this kind of problem.
See dejagnu/lib/target.exp::prune_warnings
jeff
More information about the Gcc-patches
mailing list