Jump to content

Search the Community

Showing results for tags 'comma operator'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • PIC Embedded Programming
    • BoostC and Chameleon compilers programming
    • BoostC porting source code
    • BoostC++ compiler programming
    • BoostBasic compiler programming
    • Assembler programming PIC
    • Novo RTOS Programming
    • Hardware PIC
    • Enhancement Requests
    • Bug Reports

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. Bug description: Some variations of the comma operator are broken in BoostC. Description of how it should work: http://en.wikipedia..../Comma_operator http://en.wikipedia....n_C_and_C%2B%2B Steps to reproduce: example code: unsigned char a=1, b=2, c=3, i; i = (a, ; //gives 2 syntax errors: "missing right paren" and "missing semicolon" i = a, b; //works okay: copies a to i and ignores b i = (a += 2, a + ; //gives 2 syntax errors as above i = a += 2, a + b; //works okay except "-Oa" will drop the "+=2" part i = a, b, c; //works okay; copies a to i and ignores b and c i = (a, b, c); //gives 2 syntax errors as above i = (a); //works okay; copies a to i i = (3); //works okay; sets i to 3 i = a++, b+c, b++; //works okay; copies a to i, then incs a and b; middle expr dropped i = (a++, b+c, b++); //gives 2 syntax errors as above void func1(unsigned char param) { porta = param; } func1((a)); //works okay; passes a to param func1((a, ); //gives 2 syntax errors as above Expected behaviour: The main issue is to accept params around comma-separated expressions and then use the last value. EDIT: should say "parens", not "params" The second issue is to not optimize out side effects of comma-separated expressions under aggessive optimization (see comments above) Is the problem 100% reproduceable: yes Compiler: BoostC Compiler version: 7.10, 7.051, 7.04 Target device: 16F1827, '1823, '688 OS: Windows XP don
  • Create New...