ATF-log archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
#62: -Wunused-function error with check_equals in namespace with clang++
- Subject: #62: -Wunused-function error with check_equals in namespace with clang++
- From: "atf trac notification" <nobody%julipedia.org@localhost>
- Date: Mon, 23 Aug 2010 02:40:10 -0000
#62: -Wunused-function error with check_equals in namespace with clang++
--------------------------------------------------+-------------------------
Reporter: Garrett Cooper <gcooper@...> | Owner: jmmv
Type: defect | Status: new
Priority: minor | Milestone:
Component: MISC | Version:
Keywords: |
--------------------------------------------------+-------------------------
check_equals is being optimized out with clang++ when it's declared
static, resulting in the following error:
===> Building for atf-0.10
make all-am
depbase=`echo atf-c++/test_helpers.lo | sed
's|[^/]*$|.deps/&|;s|\.lo$||'`; /bin/sh ./libtool --tag=CXX
--mode=compile clang++ -DHAVE_CONFIG_H -I. -O2 -pipe -fno-strict-
aliasing -pipe -O2 -march=nocona -fno-strict-aliasing -pipe -O2 -g -Wall
-Wcast-qual -Werror -Wextra -Wno-unused-parameter -Wpointer-arith
-Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wswitch -Wwrite-
strings -D_FORTIFY_SOURCE=2 -Wabi -Wctor-dtor-privacy -Wno-deprecated
-Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wsynth -MT
atf-c++/test_helpers.lo -MD -MP -MF $depbase.Tpo -c -o
atf-c++/test_helpers.lo atf-c++/test_helpers.cpp && mv -f $depbase.Tpo
$depbase.Plo
libtool: compile: clang++ -DHAVE_CONFIG_H -I. -O2 -pipe -fno-strict-
aliasing -pipe -O2 -march=nocona -fno-strict-aliasing -pipe -O2 -g -Wall
-Wcast-qual -Werror -Wextra -Wno-unused-parameter -Wpointer-arith
-Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wswitch -Wwrite-
strings -D_FORTIFY_SOURCE=2 -Wabi -Wctor-dtor-privacy -Wno-deprecated
-Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wsynth -MT
atf-c++/test_helpers.lo -MD -MP -MF atf-c++/.deps/test_helpers.Tpo -c
atf-c++/test_helpers.cpp -o atf-c++/test_helpers.o
clang++: warning: argument unused during compilation: '-O2'
clang++: warning: argument unused during compilation: '-O2'
In file included from atf-c++/test_helpers.cpp:45:
atf-c++/test_helpers.hpp:143:1: error: unused function 'check_equal'
[-Wunused-function]
check_equal(const char* expected[], const string_vector& actual)
^
1 error generated.
*** Error code 1
Stop in
/scratch/freebsd/perforce/user/gcooper/ports/devel/atf/work/atf-0.10.
*** Error code 1
Stop in
/scratch/freebsd/perforce/user/gcooper/ports/devel/atf/work/atf-0.10.
*** Error code 1
Stop in /scratch/freebsd/perforce/user/gcooper/ports/devel/atf.
[gcooper@bayonetta
/scratch/freebsd/perforce/user/gcooper/ports/devel/atf]$ clang --version
FreeBSD clang version 2.8 (trunk 108428) 20100720
Target: x86_64-undermydesk-freebsd9.0
Thread model: posix
The following patch fixes the issue.
--
Ticket URL: <http://www.julipedia.org/projects/atf/trac/ticket/62>
Automated Testing Framework <http://www.NetBSD.org/~jmmv/atf/>
Automated Testing Framework
Home |
Main Index |
Thread Index |
Old Index