Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Compiler Error - Compiler does not examine for subsequent functions.

Anobium
2013-11-20
2014-06-15
  • Anobium
    Anobium
    2013-11-20

    This code should not compile. I found this error today, it may relate to the & error recently reported but I found this when working on a port for Perry.

    My real code is shown in the code below but the example code (second listing) is an example of the issue.

     while (!(nrf24l01_irq_pin_active & nrf24l01_irq_rx_dr_active ))
    

    In the example there is no function called f_two. This should fail to compile, but, the compiler generates asm/hex without an error.

     #chip 16F1847, 32
     #config Osc = intOSC, MCLRE_ON, PLLEN_ON
    
     while ( !(f_one & f_two ) )
    
     end
    
     function f_one
    
             f_one = true
    
     end function
    
     function f_twooooo
             f_two = true
    
     end function
    
     
    • joe rocci
      joe rocci
      2014-06-15

      I don't see why it should fail to compile. As far as GCB is concerned f_one and f_two are just undeclared byte variables. The While statement and the functions all appear otherwise valid.

       
  • Anobium
    Anobium
    2014-06-15

    Old, old issue. I will delete this posting, if this is ok.