mysterious C compiler bug!

Discussion in 'Programmer's Corner' started by takao21203, Nov 4, 2012.

  1. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Hello I found a weird compiler bug.

    A file register was dumped with remains from the byte to int automaticconversion.

    I needed to add typecasts.

    This caused a weird overwrite! I really checked all the wires, but found no error.
     
  2. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,166
    Last edited: Nov 4, 2012
    JohnInTX and spinnaker like this.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,870
    996
  4. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    I had the opinion the code works, but registers are trashed. Using the typecasts, I can use these other regular variables now.

    Because I visualized variables in binary on the LED matrix...I saw the behaviour. This is an idea I had, using the PCBs functionality.
     
Loading...