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

Bug#344181: marked as done (apt: [libapt-pkg] compiler warning with G++ 3.4.3 on Solaris 2.11)



Your message dated Wed, 8 Oct 2008 22:17:49 +0200
with message-id <20081008201748.GA21932@debian>
and subject line Bug fixed
has caused the Debian Bug report #344181,
regarding apt: [libapt-pkg] compiler warning with G++ 3.4.3 on Solaris 2.11
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
344181: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=344181
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.5.28.6
Severity: normal
Tags: patch

(Bug given normal severity with some trepidation -- perhaps
minor would be more appropriate?)

G++ 3.4.3 on Solaris 2.11 throws a compiler warning when
compiling acquire-item.cc.

/include/apt-pkg/acquire-item.h: In constructor `pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire*, std::string, std::string, std::string, std::string, const std::vector<IndexTarget*, std::allocator<IndexTarget*> >*, indexRecords*)':
/include/apt-pkg/acquire-item.h:153: warning: `pkgAcqMetaIndex::AuthPass' will be initialized after
/include/apt-pkg/acquire-item.h:152: warning:   `indexRecords*pkgAcqMetaIndex::MetaIndexParser'
acquire-item.cc:434: warning:   when initialized here
/include/apt-pkg/acquire-item.h:152: warning: `pkgAcqMetaIndex::MetaIndexParser' will be initialized after
/include/apt-pkg/acquire-item.h:151: warning:   `const std::vector<IndexTarget*, std::allocator<IndexTarget*> >*pkgAcqMetaIndex::IndexTargets'
acquire-item.cc:434: warning:   when initialized here

This is because the constructor declared in acquire-item.h and
defined in acquire-item.cc disagree as to the order of
parameters.

Since changing acquire-item.h would constitute an ABI change,
the attached patch alters acquire-item.cc instead.

Thanks to Jeff Licquia for walking me through this, as I don't
really have a C++ brain.  He did advise that this probably
really is just a cosmetic issue, as there don't appear to be
any static class members initialized by non-static member
functions or goofy stuff like that.

Interestingly, G++ 4.0.3 on etch doesn't throw this warning.

For giggles, here's the output of "c++ --version" and "c++
-dumpspecs" on Solaris 2.11 for x86:

$ c++ --version
c++ (GCC) 3.4.3 (csl-sol210-3_4-20050802)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ c++ -dumpspecs
*asm:
--traditional-format %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)

*asm_debug:
%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}

*asm_final:


*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %|.s |
 as %(asm_options) %|.s %A }

*cpp:
%{.S:-P} %(cpp_subtarget)

*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}

*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}

*cc1:
%(cc1_cpu) %{profile:-p}

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}

*cc1plus:


*link_gcc_c_sequence:
%G %L %G

*endfile:
crtend.o%s crtn.o%s

*link:
%{h*} %{v:-V}    %{b} %{Wl,*:%*}    %{static:-dn -Bstatic}    %{shared:-G -dy %{!mimpure-text:-z text}}    %{symbolic:-Bsymbolic -G -dy -z text}    %(link_arch)    %{Qy:} %{!Qn:-Qy}

*lib:
%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio}    %{!shared:     %{!symbolic:       %{pthreads:-lpthread}        %{!pthreads:%{threads:-lthread}}        %{p|pg:-ldl} -lc}}

*libgcc:
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:-lgcc_s%M}}}

*startfile:
%{!shared:                       %{!symbolic:                     %{p:mcrt1.o%s}                           %{!p:                            %{pg:gcrt1.o%s gmon.o%s}                             %{!pg:crt1.o%s}}}}                     crti.o%s %(startfile_arch)                      crtbegin.o%s

*switches_need_spaces:


*cross_compile:
0

*version:
3.4.3

*multilib:
. !m32 !m64;32:. m32 !m64;amd64:amd64 !m32 m64;

*multilib_defaults:
m32

*multilib_extra:


*multilib_matches:
m32 m32;m64 m64;

*multilib_exclusions:


*multilib_options:
m32/m64

*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:
/usr/ccs/bin/

*md_startfile_prefix:


*md_startfile_prefix_1:


*startfile_prefix_spec:


*sysroot_suffix_spec:


*sysroot_hdrs_suffix_spec:


*cc1_cpu:
%{!mtune*: %{m386:mtune=i386 %n`-m386' is deprecated. Use `-march=i386' or `-mtune=i386' instead.
} %{m486:-mtune=i486 %n`-m486' is deprecated. Use `-march=i486' or `-mtune=i486' instead.
} %{mpentium:-mtune=pentium %n`-mpentium' is deprecated. Use `-march=pentium' or `-mtune=pentium' instead.
} %{mpentiumpro:-mtune=pentiumpro %n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mtune=pentiumpro' instead.
} %{mcpu=*:-mtune=%* %n`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
}} %<mcpu=* %{mpni:-msse3 %n`-mpni' is deprecated. Use `-msse3' instead.
} %{mno-pni:-mno-sse3 %n`-mno-pni' is deprecated. Use `-mno-sse3' instead.
} %{mintel-syntax:-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.
} %{mno-intel-syntax:-masm=att %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.
}

*cpp_subtarget:
%{pthreads:-D_REENTRANT -D_PTHREADS} %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}

*asm_cpu:


*startfile_arch:
%{ansi:values-Xc.o%s}                       %{!ansi:values-Xa.o%s}

*link_arch:
%{m64:%{G:-G}    %{YP,*}    %{R*}    %{compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64}              %{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}}              -R /usr/ucblib/64}    %{!compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64}              %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}}%{!m64:%{G:-G}    %{YP,*}    %{R*}    %{compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib}              %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}}              -R /usr/ucblib}    %{!compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib}              %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}}}

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %{pie:} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate:-lgcov}    %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}

-- System Information:
$ uname -a
SunOS zorak 5.11 snv_24 i86pc i386 i86pc

-- 
Branden Robinson          | GPG signed/encrypted mail welcome
branden@progeny.com       | 1024D/9C0BCBFB
Progeny Linux Systems     | D5F6 D4C9 E25B 3D37 068C
                          | 72E8 0F42 191A 9C0B CBFB
Index: apt-pkg/acquire-item.cc
===================================================================
--- apt-pkg/acquire-item.cc	(revision 5262)
+++ apt-pkg/acquire-item.cc	(revision 5263)
@@ -429,8 +429,10 @@
 				 string SigFile,
 				 const vector<struct IndexTarget*>* IndexTargets,
 				 indexRecords* MetaIndexParser) :
-   Item(Owner), RealURI(URI), SigFile(SigFile), AuthPass(false),
-   MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets)
+   Item(Owner), RealURI(URI), SigFile(SigFile),
+   IndexTargets(IndexTargets), 
+   MetaIndexParser(MetaIndexParser),
+   AuthPass(false)
 {
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(URI);

--- End Message ---
--- Begin Message ---
Version: 0.7.4

Hello,
thanks very much for your report. We think this has already been fixed by
Otavio Salvador in version 0.7.4, revision 1503.1.2 (2007-07-10):

--- apt-pkg/acquire-item.cc     2007-06-08 23:44:03 +0000
+++ apt-pkg/acquire-item.cc     2007-07-10 18:06:12 +0000
@@ -884,8 +884,8 @@
                                 string SigFile,
                                 const vector<struct IndexTarget*>*
                                 IndexTargets,
                                 indexRecords* MetaIndexParser) :
-   Item(Owner), RealURI(URI), SigFile(SigFile), AuthPass(false),
-   MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets),
  IMSHit(false)
+   Item(Owner), RealURI(URI), SigFile(SigFile), IndexTargets(IndexTargets),
+   MetaIndexParser(MetaIndexParser), AuthPass(false), IMSHit(false)
 {
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(URI);



-- 
http://syx.googlecode.com - Smalltalk YX
http://lethalman.blogspot.com - Thoughts about computer technologies
http://www.debian.org - The Universal Operating System

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: