[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-dev
Subject: Re: [cfe-dev] Disable #error?
From: Jacob Carlborg <doob () me ! com>
Date: 2014-01-15 8:09:53
Message-ID: lb5fo5$vjl$1 () ger ! gmane ! org
[Download RAW message or body]
On 2014-01-14 23:25, Sean Silva wrote:
> I don't think anyone would be against adding a callback to PPCallbacks
> to indicate what the error message is so you can get the data. However,
> being able to affect the outcome of compilation from a PPCallbacks
> callback seems unwise; it would be kind of like if the #if callback
> could decide which branch to take, which means explicitly violating the
> source code's meaning, which a compiler shouldn't be doing!
I think I actually need that as well :). I would like to be able to
translate code like this:
#if Windows
typedef int foo;
#else
typedef long foo;
#endif
To:
version (Windows)
alias foo = int;
else
alias foo = long;
Preferably I would like to do that without having to run the tool on
different platforms and somehow merge the results.
I know it technically violates the meaning of the source code. I'm just
trying to automate what a developer would do manually anyway. Doing it
manually just increases the risk of making mistakes.
--
/Jacob Carlborg
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic