Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 123938

Forum Post: RE: C Concatenation Operator (##) Error

$
0
0

I figured it out.  The expansion worked differently than I expected.

I made the following changes to my macros:

    #define CSL_FINST(reg, PER_REG_FIELD, TOKEN) \

        CSL_FINS((reg), ##PER_REG_FIELD, PER_REG_FIELD##_##TOKEN)

    #define CSL_FINS(reg, PER_REG_FIELD, val) \

        ((reg) = ((reg) & ~PER_REG_FIELD##_MASK)|CSL_FMK(##PER_REG_FIELD, val))

I turned on the preprocessor options to output the preprocessor and that helped me a lot in my debug because I was now able to see the actual issue.

 


Viewing all articles
Browse latest Browse all 123938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>