Matt Turner <matts...@gmail.com> writes:
> #line __LINE__
> __LINE__
> #line __LINE__
> __LINE__
>
> when run through glcpp emits this:
>
> #line 1
> 1
> #line 2
> 2

That looks absolutely correct to me, (if very strange to ever do "#line
__LINE__"). For example, this matches the behavior of "gcc -E -" on the
same example.

For "normal" uses of #line, this is what you want. The #line directive
specifies what line number the compiler should use for the subsequent
line of code, (which is useful for getting error messages that point to
the original source when the compiler is actually chewing on some
generated code derived from that source).

-Carl

-- 
carl.d.wo...@intel.com

Attachment: pgp4Khtjb2IPB.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to