c++ loosing const?
Carlo Wood
carlo@alinoe.com
Tue Apr 16 17:40:00 GMT 2002
On Tue, Apr 16, 2002 at 08:55:05PM +0200, Philipp Thomas wrote:
> gcc31_bug_const.cc: In member function `int Collision::automatic_shift()':
> gcc31_bug_const.cc:38: invalid conversion from `int (*)(int* const&, int* const&)' to `int (*)(int*&, int*&)'
> gcc31_bug_const.cc:38: initializing argument 1 of `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]'
> gcc31_bug_const.cc: In member function `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]':
> gcc31_bug_const.cc:38: instantiated from here
> gcc31_bug_const.cc:29: invalid conversion from `int (*)(int* const&, int* const&)' to `int (*)(int*&, int*&)'
> gcc31_bug_const.cc:29: initializing argument 1 of `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]'
>
> As far as I understand C++ (which isn't necessarily much), this is a bug in
> gcc and not in the code. But before entering a possibly invalid PR, I'd like
> to confirm that this is indeed a bug in gcc.
Looks like a bug to me, so file a report please.
Please use -v as commandline option to g++ and include
ALL output in the PR, not just the errors.
--
Carlo Wood <carlo@alinoe.com>
More information about the Gcc-bugs
mailing list