Board index » delphi » C++Builder Bug...

C++Builder Bug...

I have had the exerience of having my projects watches state "Undefined
Symbol XXXX" for a line which is: XXX = YYYY().

I.e., for some reason at various points in the program the symbol table
for the watches or scoping table seems to get all messed up and it will
not let me view the values for the variables that I am working on.  This
is real frustrating.

Has anyone else had this experience?  Is there a way to fix it?

-Art
--
Art Pollard                     | First there was WWI, next came WWII,
Polla...@Hawaii.Edu             | last came the WWW.
Moderator for Comp.Theory.Info-Retrieval / List Maintainer for the
Hyper-Theory (Hypertext Theory) mailing list.

 

Re:C++Builder Bug...


Quote
Art Pollard <polla...@Hawaii.Edu> wrote:
>I have had the exerience of having my projects watches state "Undefined
>Symbol XXXX" for a line which is: XXX = YYYY().
>I.e., for some reason at various points in the program the symbol table
>for the watches or scoping table seems to get all messed up and it will
>not let me view the values for the variables that I am working on.  This
>is real frustrating.
>Has anyone else had this experience?  Is there a way to fix it?

IT IS NOT A GODDAM BUG!

You're working with a modern compiler. Variables get optimised. Some get
stored in registers. If a variable is only going to be used briefly and
never again, then the compiler uses a register for it and never bothers to
keep the value permamently. (Ever wondered why you get 'warning: variable
is assigned but not used' messages? It's because the compiler recognises a
dataflow anomaly that means it will probably not store the values that you
expect).

If you want a variable always to be present and you want ever assignment
to it to be visible, then use the keyword 'volatile'. That's what it's
for.

And remember: this is not a bug. The compiler is a safe compiler. This
means that, if your program would output something running under an old
fashioned compiler, then it will output the same thing under this
compiler. But safeness is only defined with respect to the OUTPUT of a
program: not to variables assigned at intermediate stages and then
inspected with the de{*word*81}.

--
Lucian Wischik, Queens' College, Cambridge CB3 9ET. ljw1...@cam.ac.uk

Other Threads