[Bug c++/55058] New: [4.7/4.8 Regression] Unexpected invalid type conversion error

sebastian.huber@embedded-brains.de gcc-bugzilla@gcc.gnu.org
Wed Oct 24 15:39:00 GMT 2012


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

             Bug #: 55058
           Summary: [4.7/4.8 Regression] Unexpected invalid type
                    conversion error
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sebastian.huber@embedded-brains.de


Created attachment 28518
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28518
Sample code

The attached test file produces with "g++ -c test.cc" of GCC version 4.7 (e.g.
the one shipped with OpenSuse 12.2) and 4.8 the following output:

test.cc: In constructor 'C_DrvDataBuffer::C_DrvDataBuffer(ushort, ushort)':
test.cc:20748:34: error: invalid conversion from 'const T_SND_NODE
C_DrvSndDataBlock::* {aka const list_node<C_DrvSndDataBlock, with_lock,
oper_safe> C_DrvSndDataBlock::*}' to 'list_node<C_DrvSndDataBlock, with_lock,
oper_safe> C_DrvSndDataBlock::*' [-fpermissive]
test.cc:16667:1: error:   initializing argument 1 of 'list_base<
<template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::list_base(const T_C_NODE_ T_::*, const char*, bool) [with T_ =
C_DrvSndDataBlock; lock_ = with_lock; test_ = oper_safe; bool amp_ = false;
list_base< <template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::T_C_NODE_ = list_node<C_DrvSndDataBlock, with_lock, oper_safe>]'
[-fpermissive]
test.cc:20748:34: error: invalid conversion from 'const T_SND_NODE
C_DrvSndDataBlock::* {aka const list_node<C_DrvSndDataBlock, with_lock,
oper_safe> C_DrvSndDataBlock::*}' to 'list_node<C_DrvSndDataBlock, with_lock,
oper_safe> C_DrvSndDataBlock::*' [-fpermissive]
test.cc:16667:1: error:   initializing argument 1 of 'list_base<
<template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::list_base(const T_C_NODE_ T_::*, const char*, bool) [with T_ =
C_DrvSndDataBlock; lock_ = with_lock; test_ = oper_safe; bool amp_ = false;
list_base< <template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::T_C_NODE_ = list_node<C_DrvSndDataBlock, with_lock, oper_safe>]'
[-fpermissive]
test.cc:20748:34: error: invalid conversion from 'const T_RCV_NODE
C_DrvRcvDataBlock::* {aka const list_node<C_DrvRcvDataBlock, with_lock,
oper_safe> C_DrvRcvDataBlock::*}' to 'list_node<C_DrvRcvDataBlock, with_lock,
oper_safe> C_DrvRcvDataBlock::*' [-fpermissive]
test.cc:16667:1: error:   initializing argument 1 of 'list_base<
<template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::list_base(const T_C_NODE_ T_::*, const char*, bool) [with T_ =
C_DrvRcvDataBlock; lock_ = with_lock; test_ = oper_safe; bool amp_ = false;
list_base< <template-parameter-1-1>, <template-parameter-1-2>, test_,
amp_>::T_C_NODE_ = list_node<C_DrvRcvDataBlock, with_lock, oper_safe>]'
[-fpermissive]

The test code can be compiled with the Comeau-Online-Compiler:

http://www.comeaucomputing.com/tryitout

The GCC 4.6 works also.



More information about the Gcc-bugs mailing list