octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: old-style cast warnings


From: Rik
Subject: Re: old-style cast warnings
Date: Wed, 05 Sep 2012 10:33:57 -0700

9/5/12

Dan,

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.

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]