Jump to content

Search the Community

Showing results for tags 'macro body'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I would like to request a larger macro body limit (about 50% larger than it is now with BoostC 7.051, maybe 2x larger). The current limit is pretty good (it's better than other compilers I have tried), and is one of the reasons I chose BoostC. However, I have some very complex macros, and some of them go over the macro body length limit. To get them to compile requires awkward work-arounds like spltting up the macro or pre-expanding multiple copies of it with known parameters and then wrapping them in inline functions - this clutters up the code considerably. BTW, these macros are so complex because I need very efficient code, so I am forcing the compiler to reduce the expressions into simple constants at compile-time. Here is a very simplified example: Assuming "other_value" is a constant and "expression_one" and "expression_two" are also, this entire expression can be reduced to a simple constant at compile time. However the ternary "?:" operator seems to prevent most C compilers from doing this, so a conditional code is generated and adds to run-time overhead. To work around that issue, I use a macro such as the following: This macro nicely reduces the entire conditional expression to a simple compile-time constant, but if "expr" is complex, this can easily go over the macro body length limit (because "expr" appears twice within the macro body). I have other examples, but hopefully this has presented a case for a longer macro body length limit. thanks don
×
×
  • Create New...