[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: old-style cast warnings
From: |
John W. Eaton |
Subject: |
Re: old-style cast warnings |
Date: |
Wed, 5 Sep 2012 13:52:41 -0400 |
On 5-Sep-2012, Rik wrote:
| I don't know if you're still bothered by it, but I think I know a way to
| mask the warnings in the parse-tree directory. The problem is that we use
| auto-generated code from the outside utilities Flex and Yacc. These
| programs are going to be using old-style casts and there isn't much we can
| do about that.
|
| In the current build system there is a rule which attempts to turn off the
| old-style cast warning. It is in parse-tree/module.mk and is shown below.
|
| lex.lo lex.o oct-parse.lo oct-parse.o: \
| AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
|
| The problem is that Automake does not support per-object compilation rules
| so the two lines above do nothing. But, Automake does detail how to
| emulate per-object rules here
|
(http://www.gnu.org/software/automake/manual/html_node/Per_002dObject-Flags.html).
| It would be quite easy to use their strategy and turn off the warnings for
| these particular files which we know are going to have old code constructs.
|
| If you're interested this seems like a reasonable solution or we can just
| let it ride.
It then also disables warnings for C-style casts that appear in the
code we've written in lex.ll.
I'd say leave it alone.
jwe