<p dir="ltr">What are you really trying to do?</p>
<div class="gmail_quote">On 10 Jul 2015 8:32 pm, "kirbyfan64sos" <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I posted this on  Stack Overflow<br>
<<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_31352011_clang-2Dline-2Ddirective&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=AYEPsn-VqMIilsRrFbQRjyqNWlKOxJE92PvRyF_sqVE&s=LRm_Ll0-u4TvHdQzgLZqbdJb5WQmkbnRaUon30xVhsY&e=" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/31352011/clang-line-directive</a>>  , but I<br>
just got 1 downvote (technically 2, but I also got 1 upvote) and 3 close<br>
votes. So...yeah. :/<br>
<br>
Basically, I have ln.x:<br>
<br>
abc<br>
<br>
And ln.cpp<br>
<br>
#line 1 "ln.x"<br>
(<br>
<br>
GCC prints the corresponding line of ln.x:<br>
<br>
ln.x:1:1: error: expected unqualified-id at end of input<br>
 abc<br>
 ^<br>
ln.x:1:1: error: expected ‘)’ at end of input<br>
<br>
But Clang simply prints the line in ln.cpp:<br>
<br>
ln.x:1:2: error: expected unqualified-id<br>
(<br>
 ^<br>
ln.x:1:2: error: expected ')'<br>
ln.x:1:1: note: to match this '('<br>
(<br>
^<br>
2 errors generated.<br>
<br>
Is there a way to achieve the GCC behavior in Clang?<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang-2Ddevelopers.42468.n3.nabble.com_Line-2Ddirectives-2Din-2DClang-2Dvs-2DGCC-2Dtp4046494.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=AYEPsn-VqMIilsRrFbQRjyqNWlKOxJE92PvRyF_sqVE&s=c6B-ASEMXKr-FzaObzISwABfGdGIAK4FNaO3z1qL6M8&e=" rel="noreferrer" target="_blank">http://clang-developers.42468.n3.nabble.com/Line-directives-in-Clang-vs-GCC-tp4046494.html</a><br>
Sent from the Clang Developers mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>