mysterious C compiler bug!

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

  1. takao21203

    Thread Starter AAC Fanatic!

    Apr 28, 2012
    3,783
    502
    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
    4,722
    5,054
    Last edited: Nov 4, 2012
    JohnInTX and spinnaker like this.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    6,644
    2,928
  4. takao21203

    Thread Starter AAC Fanatic!

    Apr 28, 2012
    3,783
    502
    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...