This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, 5 May 2003 21:44:50 +0700 (ICT), Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> wrote:
This patch fixes an incorrect diagnostics about invalid pointer-to-member functions. When such code appears in const member, the 'this' pointer contains an extra const qualifier. We have to remove that qualifier when outputting the diagnostics.
Thanks, but you should strip the const when initializing base, rather than in the pedwarn. We don't need it for the call to build_offset_ref, either.
OK, will do. However the legal case when user specified '&a::f', handled elsewhere, also build the OFFSET_REF with const qualifier. I think that should be fixed as well.
Sorry, that was an error while generating the diff. It was not applied to the CVS.*************** build_x_compound_expr (list) *** 4793,4799 **** /* the left-hand operand of a comma expression is like an expression statement: we should warn if it doesn't have any side-effects, unless it was explicitly cast to (void). */ ! if ((extra_warnings || warn_unused_value) && !(TREE_CODE (TREE_VALUE(list)) == CONVERT_EXPR && VOID_TYPE_P (TREE_TYPE (TREE_VALUE(list))))) warning("left-hand operand of comma expression has no effect"); --- 4802,4808 ---- /* the left-hand operand of a comma expression is like an expression statement: we should warn if it doesn't have any side-effects, unless it was explicitly cast to (void). */ ! if (warn_unused_value && !(TREE_CODE (TREE_VALUE(list)) == CONVERT_EXPR && VOID_TYPE_P (TREE_TYPE (TREE_VALUE(list))))) warning("left-hand operand of comma expression has no effect");
This hunk is unrelated. If you applied it, please revert it.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |