pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/25715: pkgsrc/textproc/chasen-base



>Number:         25715
>Category:       pkg
>Synopsis:       Compilation error with gcc 3.4.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 26 12:29:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     John R. Shannon
>Release:        NetBSD 2.0_BETA
>Organization:
        johnrshannon.com
>Environment:
System: NetBSD colleen.internal.johnrshannon.com 2.0_BETA NetBSD 2.0_BETA 
(KERNEL) #0: Mon May 24 05:31:10 MDT 2004 
root%colleen.internal.johnrshannon.com@localhost:/usr/obj/usr/src/sys/arch/i386/compile/KERNEL
 i386
Architecture: i386
Machine: i386
>Description:
 g++ -DRCPATH=\"/usr/pkg/etc/chasen/chasenrc\" -DHAVE_CONFIG_H -I. -I.. 
-I/usr/obj/pkg/textproc/chasen-base/work/.buildlink/include -O2 -march=pentium4 
-msse2 -c dartsdic.cpp -MT dartsdic.lo -MD -MP -MF .deps/dartsdic.TPlo  -fPIC 
-DPIC -o .libs/dartsdic.o
 dartsdic.cpp: In function `int da_build_dump(da_build_t*, char*, FILE*)':
 dartsdic.cpp:180: error: ISO C++ forbids cast to non-reference type used as 
lvalue

>How-To-Repeat:
        Build with wip/gcc-3.4
>Fix:

$NetBSD$

--- lib/dartsdic.cpp.orig       2003-07-30 10:06:57.000000000 -0600
+++ lib/dartsdic.cpp
@@ -177,7 +177,7 @@ da_build_dump(da_build_t* builder, char*
            lex_indices.push_back(i->second);
        }
        lens[size] = key.size();
-       (const char*)keys[size] = key.data();
+       keys[size] = const_cast<char*>(key.data());
        vals[size] = redump_lex(lens[size], lex_indices, tmpfile, lexfile);
        if (vals[size] < 0) {
            std::cerr << "Unexpected error at " << key << std::endl;
>Release-Note:
>Audit-Trail:
>Unformatted:



Home | Main Index | Thread Index | Old Index