On 12.11.2008, at 12:30, Graham Cox wrote:
lvalp->val = strtod( --wptr, &wptr );
"warning: operation on 'wptr' may be undefined"
For a detailed description of why this is bad, see:
http://zathras.de/blog-c-parameter-evaluation-order.htm
Cheers,
-- Uli Kusterer
"The Witnesses of Teac
On 13 Nov 2008, at 4:46 pm, Daniel Hyde wrote:
In the process of writing this email I've noticed that wptr is
initialised to NULL. Is there any case where that line might be
reached without changing wptr's value first? It might be warning you
that you're possibly going to decrement a NULL poi
On Thu, Nov 13, 2008 at 4:46 PM, Daniel Hyde <[EMAIL PROTECTED]> wrote:
>> The order of evaluation of the arguments to a function is undefined so
>> you have a problem where you're taking the address of wptr and you're
>> pre-decrementing it.
>
> That doesn't look problematic to me -- decrementing
On Wed, Nov 12, 2008 at 10:20 PM, Graham Cox <[EMAIL PROTECTED]> wrote:
> I just added some fairly old C++ lex/bison code to my app, code that has
> been in use for a long time elsewhere and works fine. My app is compiling
> with much stricter warnings than many of my other projects though, and thi
On Wed, Nov 12, 2008 at 6:30 AM, Graham Cox <[EMAIL PROTECTED]> wrote:
>
> On 12 Nov 2008, at 10:20 pm, Graham Cox wrote:
>
>> I just added some fairly old C++ lex/bison code to my app, code that has
>> been in use for a long time elsewhere and works fine. My app is compiling
>> with much stricter
On 12 Nov 2008, at 10:20 pm, Graham Cox wrote:
I just added some fairly old C++ lex/bison code to my app, code that
has been in use for a long time elsewhere and works fine. My app is
compiling with much stricter warnings than many of my other projects
though, and this line is throwing a w
I just added some fairly old C++ lex/bison code to my app, code that
has been in use for a long time elsewhere and works fine. My app is
compiling with much stricter warnings than many of my other projects
though, and this line is throwing a warning:
lvalp->val = strtod( --wptr, &w