Bug#538647: marked as done (g++-4.3: g++ examines second value to "?" always if it is a template)

2009-07-26 Thread Debian Bug Tracking System

Your message dated Sun, 26 Jul 2009 08:59:22 +0200
with message-id <87tz100w1h@mid.deneb.enyo.de>
and subject line Re: Bug#538647: g++-4.3: g++ examines second value to "?" 
always if it is a template
has caused the Debian Bug report #538647,
regarding g++-4.3: g++ examines second value to "?" always if it is a template
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 ow...@bugs.debian.org
immediately.)


-- 
538647: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538647
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: g++-4.3
Version: 4.3.2-1.1
Severity: important


Let an example do the talking

template< unsigned int result, unsigned int wanted, unsigned int guess >
struct log2_calculator;

// Specialisation that ends recursion.
template< unsigned int result, unsigned int wanted >
struct log2_calculator< result, wanted, 0>
{
enum { value = 0 }; // Invalid.
};

template< unsigned int result, unsigned int wanted, unsigned int guess >
struct log2_calculator
{
typedef log2_calculator< result+1, wanted, guess << 1 > next_value_type;
/*HERE*/enum { value = (wanted <= guess) ? result : next_value_type::value };
};

The intention of this code is to work out log2(a) at compile time, lacking
some other mechanism.

This allows...

enum { is3 = log2_calculator< 0,  8, 1 >::value };
enum { is4 = log2_calculator< 0, 16, 1 >::value };
enum { is6 = log2_calculator< 0, 64, 1 >::value };

something that's more obviously useful inside templates.

enum { isX = log2_calculator< 0, sizeof(N)*8, 1 >::value };

Anyway, the problem becomes obvious when you omit the specialisation from the
above - g++ reaches it's template nesting limit because it's instantiating
the template that's the second value to "?" even though the conditional is
true.
I've marked the line above with /*HERE*/.

-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages g++-4.3 depends on:
ii  gcc-4.3   4.3.2-1.1  The GNU C compiler
ii  gcc-4.3-base  4.3.2-1.1  The GNU Compiler Collection (base 
ii  libc6 2.7-18 GNU C Library: Shared libraries
ii  libgmp3c2 2:4.2.2+dfsg-3 Multiprecision arithmetic library
ii  libmpfr1ldbl  2.3.1.dfsg.1-2 multiple precision floating-point 
ii  libstdc++6-4.3-dev4.3.2-1.1  The GNU Standard C++ Library v3 (d

g++-4.3 recommends no packages.

Versions of packages g++-4.3 suggests:
ii  g++-4.3-multilib 4.3.2-1.1   The GNU C++ compiler (multilib fil
ii  gcc-4.3-doc  4.3.2.nf1-1 documentation for the GNU compiler
pn  libstdc++6-4.3-dbg (no description available)

-- no debconf information


--- End Message ---
--- Begin Message ---
* Philip Ashmore:

> /*HERE*/enum { value = (wanted <= guess) ? result : next_value_type::value };

Not a bug.  You need to implement your own conditional operator at the
template level to make this work.  The version with ?: is not valid
C++.

--- End Message ---


gnat-4.4_4.4.0-1_amd64.changes ACCEPTED

2009-07-26 Thread Archive Administrator

Accepted:
gnat-4.4-base_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/gnat-4.4-base_4.4.0-1_amd64.deb
gnat-4.4_4.4.0-1.diff.gz
  to pool/main/g/gnat-4.4/gnat-4.4_4.4.0-1.diff.gz
gnat-4.4_4.4.0-1.dsc
  to pool/main/g/gnat-4.4/gnat-4.4_4.4.0-1.dsc
gnat-4.4_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/gnat-4.4_4.4.0-1_amd64.deb
gnat-4.4_4.4.0.orig.tar.gz
  to pool/main/g/gnat-4.4/gnat-4.4_4.4.0.orig.tar.gz
libgnat-4.4-dbg_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnat-4.4-dbg_4.4.0-1_amd64.deb
libgnat-4.4_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnat-4.4_4.4.0-1_amd64.deb
libgnatprj4.4-dbg_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatprj4.4-dbg_4.4.0-1_amd64.deb
libgnatprj4.4-dev_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatprj4.4-dev_4.4.0-1_amd64.deb
libgnatprj4.4_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatprj4.4_4.4.0-1_amd64.deb
libgnatvsn4.4-dbg_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatvsn4.4-dbg_4.4.0-1_amd64.deb
libgnatvsn4.4-dev_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatvsn4.4-dev_4.4.0-1_amd64.deb
libgnatvsn4.4_4.4.0-1_amd64.deb
  to pool/main/g/gnat-4.4/libgnatvsn4.4_4.4.0-1_amd64.deb


Override entries for your package:
gnat-4.4-base_4.4.0-1_amd64.deb - optional libs
gnat-4.4_4.4.0-1.dsc - optional devel
gnat-4.4_4.4.0-1_amd64.deb - optional devel
libgnat-4.4-dbg_4.4.0-1_amd64.deb - extra debug
libgnat-4.4_4.4.0-1_amd64.deb - optional libs
libgnatprj4.4-dbg_4.4.0-1_amd64.deb - extra debug
libgnatprj4.4-dev_4.4.0-1_amd64.deb - optional libdevel
libgnatprj4.4_4.4.0-1_amd64.deb - optional libs
libgnatvsn4.4-dbg_4.4.0-1_amd64.deb - extra debug
libgnatvsn4.4-dev_4.4.0-1_amd64.deb - optional libdevel
libgnatvsn4.4_4.4.0-1_amd64.deb - optional libs

Announcing to debian-devel-chan...@lists.debian.org


Thank you for your contribution to Debian.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



[Bug libgcj/40859] [4.4/4.5 regression] regressions in libjava testsuite on arm-linux

2009-07-26 Thread mikpe at it dot uu dot se


--- Comment #1 from mikpe at it dot uu dot se  2009-07-26 12:54 ---
Looks like fallout from revision 144323. As far as I can tell the "warning" is
informational (ABI change from 4.3) so should be suppressed or ignored in the
test suite.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40859

--- You are receiving this mail because: ---
You reported the bug, or are watching the reporter.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#538647: closed by Florian Weimer (Re: Bug#538647: g++-4.3: g++ examines second value to "?" always if it is a template)

2009-07-26 Thread Philip Ashmore



* Philip Ashmore:

  

/*HERE*/enum { value = (wanted <= guess) ? result : next_value_type::value };



Not a bug.  You need to implement your own conditional operator at the
template level to make this work.  The version with ?: is not valid
C++

Not valid C++ ? My C++ compiler (g++) disagrees.

Think of

   enum { big_int = (sizeof(int) > 4) ? true : false };

Have you tried compiling the example?

I don't remember reading anything about "conditional operator at the template 
level" in
Stroustrup's "C++ programming language (third edition).
Could you elaborate?

Philip



[Bug bootstrap/37739] [4.4 Regression] bootstrap broken with core gcc > gcc-4.2.x

2009-07-26 Thread giffordj at la dot twcbc dot com


--- Comment #29 from giffordj at la dot twcbc dot com  2009-07-26 20:28 
---
STAGE1_CFLAGS="-g -O2" is a workaround, -O1 gave failure later in the build.
-O2 built GCC all the way through, with only one unexpected testsuite failure.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37739

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org