On Thu, Nov 29, 2012 at 10:38 AM, Carl Worth <cwo...@cworth.org> wrote: > 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. >
Huh, you're right. (#line __LINE__ is indeed weird, so the only reason you might do that would be in #line __LINE__ "filename" where you really only cared about setting the filename.) > 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). Series is Reviewed-by: Matt Turner <matts...@gmail.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev