Launchpad has imported 7 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39608.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2009-04-01T08:03:27+00:00 Pawel-sikora-9 wrote:

during testing 4.4 snapshot i get an compilation error on boost-1.38.0
codebase.

% x86_64-gnu-linux-g++ t.ii -std=gnu++0x -c
t.ii: In member function 'size_t boost::dynamic_bitset<Block, 
Allocator>::count() const':
t.ii:30558: error: 'mode' cannot appear in a constant-expression
t.ii:30558: error: template argument 1 is invalid
t.ii:30558: error: expected '>' before '*' token
t.ii:30558: error: expected '(' before '*' token
t.ii:30558: error: expected primary-expression before '>' token

(...)
template <bool value>
struct value_to_type
{
    value_to_type() {}
};
(...)
template <typename Block, typename Allocator>
typename dynamic_bitset<Block, Allocator>::size_type
dynamic_bitset<Block, Allocator>::count() const
{
    using detail::dynamic_bitset_impl::table_width;
    using detail::dynamic_bitset_impl::access_by_bytes;
    using detail::dynamic_bitset_impl::access_by_blocks;
    using detail::dynamic_bitset_impl::value_to_type;

    const bool no_padding =
        dynamic_bitset<Block, Allocator>::bits_per_block
        == 8 * sizeof(Block);

    const bool enough_table_width = table_width >= 8;

    const bool mode = (no_padding && enough_table_width)
                          ? access_by_bytes
                          : access_by_blocks;

    return do_count(m_bits.begin(), num_blocks(), Block(0),
                                       static_cast<value_to_type<mode> *>(0));
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}

4.3.3 accepts this code. is it a boost bug or 4.4 regression?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/0

------------------------------------------------------------------------
On 2009-04-01T08:04:28+00:00 Pawel-sikora-9 wrote:

Created attachment 17575
testcase

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/1

------------------------------------------------------------------------
On 2009-04-01T15:47:57+00:00 Rguenth wrote:

Unless proven invalid it is.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/2

------------------------------------------------------------------------
On 2009-04-02T09:41:16+00:00 Jakub-gcc wrote:

This errors since r144618, i.e. PR9634 (DR224) commit.  The same fix has
been applied to 4.3 branch, so if this is a g++ bug, it would be 4.3
regression too, if it is not, it should be closed as INVALID.

Jason?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/3

------------------------------------------------------------------------
On 2009-04-03T17:25:16+00:00 Jason-gcc wrote:

Subject: Bug 39608

Author: jason
Date: Fri Apr  3 17:24:46 2009
New Revision: 145508

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145508
Log:
        PR c++/39608
        * semantics.c (finish_id_expression): Don't assume a dependent
        member of the current instantiation isn't a valid integral
        constant expression.  Check dependent_scope_p.
        * pt.c (dependent_scope_p): Check TYPE_P.

Added:
    trunk/gcc/testsuite/g++.dg/template/const2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/6

------------------------------------------------------------------------
On 2009-04-03T17:27:10+00:00 Jason-gcc wrote:

Subject: Bug 39608

Author: jason
Date: Fri Apr  3 17:26:50 2009
New Revision: 145509

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145509
Log:
        PR c++/39608
        * semantics.c (finish_id_expression): Don't assume a dependent
        member of the current instantiation isn't a valid integral
        constant expression.  Check dependent_scope_p.
        * pt.c (dependent_scope_p): Check TYPE_P.
        (tsubst_copy): If args is null, just return.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/const2.C
      - copied unchanged from r145508, 
trunk/gcc/testsuite/g++.dg/template/const2.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/pt.c
    branches/gcc-4_4-branch/gcc/cp/semantics.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/7

------------------------------------------------------------------------
On 2009-04-03T18:05:48+00:00 Jason-gcc wrote:

Fixed in 4.3, 4.4 and trunk.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/354305/comments/8

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/354305

Title:
  g++-4.3 regression, rejects valid code

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/354305/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to