This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Warning message when building tst-pthread-getattr.c
- From: Steve Ellcey <sellcey at marvell dot com>
- To: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Thu, 25 Jul 2019 22:02:00 +0000
- Subject: Warning message when building tst-pthread-getattr.c
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7LHICNVUQl5oi38uGtTVqOinVu1LcBo0yaCvTO23HhY=; b=BgGhuoUjEQxMPoZQfxiV1G5WftUWi4jfFiIwqvDrSBznYs/3J11SUyHYxHrYu1pvZRJh+B0K+W4WzsO3s8r5BLkEyKohFvXwg7Pguls8sN5qZZE9HFI5hQzyNoEntW03aPhxwJoxoCL9qomRNeI534NyUguCuG17++e+wJwFdZLwicKdoy7ea4rb8YqElYT3d1YNWHF9mvdAf1zWNXS70eYGAUrvSKORcVc1XCnewj830NYsOkCgiABn/63XeRL5Q1KHG/WmC0usygrvdlfono6Mk3VUuhmjmtm3Bz3TC8oXemEx0gHFX7t0chU3kv0WKa4LhJKbDM4Mj3OyQSu+1Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IAoGICeBNIdM0wnOwiknI7uYKNAermyMQ3+YFyUlX1xNK9JpCBGFiL9EQSfTyZjPuom7uCYZiObVxeVIaUcJ1t2v2uorit8W5Hv0qlmjq1coEzWwznKU0Q+E1IT9vIMRqif2LsYC931PnYGpFR51SkNmCea+4DwCzpnjqRpZlYfZ0IE2YFuOrpqkxHsINpEtxL6LfoiLZXe2Z7GJzWLaNI/81PCBw10OCsrfSf/4TXeZNkxtuzsqWjBqUlYQhT53NbH4Vs8rYOkzp4Zk8Xx0WmT06rgf9V6EwEWAjgNQKJVwTwSz8I1G/AcX+Py73Vo0VziFirsQeX578yfWeGIs9g==
I just built the latest glibc with the latest gcc and, when running the
testsuite, got an error. Has anyone else seen this? It doesn't look like
the test has changed recently so I am guessing that GCC just got stricter
in its checking. Should we add a DIAG_IGNORE_NEEDS_COMMENT here?
Steve Ellcey
sellcey@marvell.com
tst-pthread-getattr.c: In function ‘allocate_and_test’:
tst-pthread-getattr.c:54:10: error: function returns address of local variable [-Werror=return-local-addr]
54 | return mem;
| ^~~
In file included from ../include/alloca.h:3,
from tst-pthread-getattr.c:26:
../stdlib/alloca.h:35:23: note: declared here
35 | # define alloca(size) __builtin_alloca (size)
| ^~~~~~~~~~~~~~~~~~~~~~~
tst-pthread-getattr.c:51:9: note: in expansion of macro ‘alloca’
51 | mem = alloca ((size_t) (mem - target));
| ^~~~~~
cc1: all warnings being treated as errors
../o-iterator.mk:9: recipe for target '/extra/sellcey/gcc-vect-newalloc/obj-glibc/nptl/tst-pthread-getattr.o' failed