|
From: | Daniel J Sebald |
Subject: | Re: Unwarranted old-style cast warning and non-critical error |
Date: | Fri, 24 Aug 2012 12:24:22 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 08/23/2012 05:26 PM, Daniel J Sebald wrote:
On 08/23/2012 05:04 PM, John W. Eaton wrote:On 23-Aug-2012, Daniel J Sebald wrote: | Most of these are what look to be one time C code, stored as an ll file, | converted to a cc file. In such files it looks like casting 0 to | something is the common warning. I'd help rid some of these, if you | like. You'd have to review though. I don't know how you can get rid of warnings in code generated by flex unless you fix flex so that it conditionally generates C++ style casts when the output file is supposed to be C++ code.Oh, flex creates that? I didn't know it added that much. Can some redefining macros be used somehow to compile that file? I.e., define DBL_MAX to be some valid C++ cast? Or is it better to go after a fix for flex?
I looked at the flex manual. It appears that flex's plan to address this is not to modify the C support, but instead to create a C++ class stream version of flex output:
http://flex.sourceforge.net/manual/Cxx.html#CxxIt's in an experimental state at the moment, so maybe the above link could be added to this item in the Octave projects list:
http://wiki.octave.org/Projects"Input stream class for parser files -- must manage buffers for flex and context for global variable settings."
and leave it at that for now. Dan
[Prev in Thread] | Current Thread | [Next in Thread] |