help-gplusplus
[Top][All Lists]
Advanced

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

Re: Function pointers and Optimization flag


From: Maxim Yegorushkin
Subject: Re: Function pointers and Optimization flag
Date: 22 Oct 2006 03:59:01 -0700
User-agent: G2/1.0

angelo wrote:
> Hello, I am new to this group so hello to everybody.
> I start with a problem which occur when the optimization
> flag is enabled (-O1, ..., -O3) when compiling the following
> code which contain function pointers. The code compile
> with no problems and works correctly when no
> optimization is selected. When I turn-on the optimizer,
> the program produces a non-correct result. I used gcc
> 4.0.3 under Linux Ubuntu.
> Thanks in advance for any help or suggestion.

In addition to using -Wall -Wextra, you can try running your program
under valgrind to find questionable code paths.



reply via email to

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