[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: =?UTF-8?B?W0J1ZyBjKysvODE2MzZdIE5ldzogQ29uZnVzaW5nIHdhcm5pbmcgbWVzc2Fn?= =?UTF-8?B?ZSBjb250YWluaW5nI
From: "abbeyj+gcc at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2017-07-31 18:20:32
Message-ID: bug-81636-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81636
Bug ID: 81636
Summary: Confusing warning message containing "#‘obj_type_ref'
not supported by expression#"
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: abbeyj+gcc at gmail dot com
Target Milestone: ---
This occurs with any version of GCC that I've tried that recognizes -std=c++11.
It seems to affect all versions v4.7.1 through v7.1 according to
https://gcc.godbolt.org/
Test case:
class C {
virtual int MyVirtual();
void Foo();
};
void C::Foo() {
int x{ MyVirtual() / 2.0 };
}
$ g++-4.9.4 -std=c++11 -c test.cpp
test.cpp: In member function ‘void C::Foo()':
test.cpp:7:22: warning: narrowing conversion of ‘((double)(#‘obj_type_ref' not
supported by expression#)(this) / 2.0e+0)' from ‘double' to ‘int' inside { }
[-Wnarrowing]
int x{ MyVirtual() / 2.0 };
^
I believe that GCC is correct to issue a warning here. But the text of the
warning message is not friendly, especially the "#‘obj_type_ref' not supported
by expression#" part.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic