Menu

#2 Disabling the new evaluation of in-source #defines and #unde

None
accepted
nobody
help (2)
5
2013-01-18
2011-10-10
No

We too would like to see this. We want to clean up a set of redundant #ifdefs in our code. Coan works well but we want it to remove only macros we explicitly specify and ignore ones it finds in the code. I hacked Coan to do this (in symbol.c)

if (!INSOURCE) {
//replacing is_unconditional_line() || !INSOURCE) {

But it would be neater to have a command line switch.

Another example is

#undef DEBUG_THIS_FILE
...
#ifdef DEBUG_THIS_FILE
printf(“Hello world”);
#endif

Even though DEBUG_THIS_FILE is explicitly undef’d we want to keep it.

Discussion

  • Tony Whitley

    Tony Whitley - 2011-10-10
    • labels: --> help
     
  • Mike Kinghan

    Mike Kinghan - 2013-01-18
    • status: open --> accepted
    • milestone: -->
     
  • Mike Kinghan

    Mike Kinghan - 2013-01-18
     
  • Mike Kinghan

    Mike Kinghan - 2013-01-18
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.