[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Disable #error?
From:       Sean Silva <silvas () purdue ! edu>
Date:       2014-01-15 17:39:14
Message-ID: CAHnXoanq+uoeOKCBA4aSGjkD1fc8Njp_3kWJELA5s+DTZVyRDA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Jan 15, 2014 at 2:48 AM, Jacob Carlborg <doob@me.com> wrote:

> On 2014-01-14 23:14, Kim Gr=E4sman wrote:
>
>  That's one way of looking at it.
>>
>> But we're not really compiling (maybe Jacob is, in some sense); we're
>> doing static analysis and the #error directives could give us useful
>> data for analysis instead of just aborting.
>>
>
> I'm doing source to source translation. I don't know if you consider that
> compiling. It doesn't generate any object or exectuable code.


You are trying to understand the meaning of the program, which means that
you are under the same correctness constraints as when compiling. Consider:

#if defined(FOO)
#error "bar"
void
#else
int
#endif
some_function(int arg);

If you ignore the #error, you will misunderstand the program's semantics.

-- Sean Silva


>
>
>  Regex was actually my next plan of attack, we'll see if I ever get
>> around to it :-)
>>
>
> I would prefer to avoid that.
>
>
> --
> /Jacob Carlborg
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, \
Jan 15, 2014 at 2:48 AM, Jacob Carlborg <span dir="ltr">&lt;<a \
href="mailto:doob@me.com" target="_blank">doob@me.com</a>&gt;</span> wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im">On 2014-01-14 23:14, Kim Gräsman wrote:<br> \
<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> That&#39;s one way of looking at it.<br>
<br>
But we&#39;re not really compiling (maybe Jacob is, in some sense); we&#39;re<br>
doing static analysis and the #error directives could give us useful<br>
data for analysis instead of just aborting.<br>
</blockquote>
<br></div>
I&#39;m doing source to source translation. I don&#39;t know if you consider that \
compiling. It doesn&#39;t generate any object or exectuable \
code.</blockquote><div><br></div><div>You are trying to understand the meaning of the \
program, which means that you are under the same correctness constraints as when \
compiling. Consider:</div> <div><br></div><div>#if defined(FOO)</div><div>#error \
&quot;bar&quot;</div><div>void</div><div>#else</div><div>int</div><div>#endif</div><div>some_function(int \
arg);</div><div><br></div><div>If you ignore the #error, you will misunderstand the \
program&#39;s semantics.</div> <div><br></div><div>-- Sean Silva</div><div> \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im"><br> <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Regex was actually my next plan of attack, we&#39;ll see if \
I ever get<br> around to it :-)<br>
</blockquote>
<br></div>
I would prefer to avoid that.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
/Jacob Carlborg<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" \
target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br> \
</div></div></blockquote></div><br></div></div>



_______________________________________________
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