[C++ patch] use better sloc for enum literals

Mark Mitchell mark@codesourcery.com
Tue Sep 7 14:07:00 GMT 2010


On 9/7/2010 6:42 AM, Arnaud Charlet wrote:

> - either add a loc param to build_lang_decl, which means updating
>   dozens of calls to build_lang_decl (I guess as a first step, we could
>   default to input_location)
> - or adjust the location just after the call to build_lang_decl
> 
> I guess the second approach would be less disruptive as an incremental change,
> what do you think?

Be like Microsoft.  Add build_lang_decl_ex, which has the location_t
parameter.  Have build_lang_decl call it.  Switch things to use
build_lang_decl_ex gradually.  Then, rename that build_lang_decl when
you're all done.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list