#31 variable declaration problem

NXC (53)

Something seems to be wrong in the algorithm which names variable in the NBC conversion. The following program

task main() {
int i;
int j;

Fails to compile with this error
Line 7: Error: Duplicate variable declaration (__main__7qG207qG2__000)

If the variables are named q and r, then its ok.

This is occurring with version 32 of the compiler.
Rupert B


  • Rupert

    Rupert - 2007-09-12

    Logged In: YES
    Originator: YES

    This seems to be fixed with version 33 of the compiler. Thanks!

    (Havent tried all the others yet.)

  • Nobody/Anonymous

    Logged In: NO


    I've tested it on my GNU/Linux nbc compiler. It works perfectly (whithout any errors).
    Are you using nbc under Windows?


  • Rupert

    Rupert - 2007-09-26

    Logged In: YES
    Originator: YES

    Yes this was on Windows. However, seems to be fixed in version 33. I dont know why but Beta33 is NOT linked from the NBC page, however, if you download the latest test_release of Bricxcc, it is there. At least, it reports that it is version beta 33, from september rather than August.

    C:\Documents and Settings\Rupert Brooks>"c:\Program Files\BricxCC"\nbc
    Next Byte Codes Compiler version 1.0.1.b33 (, built Sun Sep 9 16:29:08 C
    DT 2007)
    Copyright (c) 2006, John Hansen
    Use "nbc -help" for more information.

    C:\Documents and Settings\Rupert Brooks>

  • John Hansen

    John Hansen - 2007-09-26
    • status: open --> closed-fixed
  • John Hansen

    John Hansen - 2007-09-26

    Logged In: YES
    Originator: NO

    The windows version of the compiler had a case-sensitivity bug that was affecting the variable decoration scheme I was using in versions of the compiler prior to b33. Beta 33 will be officially released in the next few days but I have been releasing binary versions with fixes included in the test_release.zip for the Win32 platform. Other platforms were not impacted by the case-sensitivity bug.

    John Hansen


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks