gengtype improvements for plugins, completed! patch 3/N [inputfile]

Laurynas Biveinis laurynas.biveinis@gmail.com
Fri Sep 10 08:49:00 GMT 2010


2010/9/10 Basile Starynkevitch <basile@starynkevitch.net>:
> A. Use const input_file* in every function which conceptually don't
> modify input_file-s, but then adding some CONST_CAST at every call to
> get_output_file_with_visibility.
>
> B. Declare every function with const input_file* including even
> get_output_file_with_visibility which will have to CONST_CAST its
> argument to update its inpoutf field.  But that function indeed and
> importantly updates the inpoutf field of input_file and honestly is not
> dealing with its input_file* as a constant argument.
>
> C. remove every const for input_file* functions, since they all
> indirectly can modifiy its inpoutf field thru
> get_output_file_with_visibility.

I see. In that case I'd leave the patch as-is and postpone const
cleanups to a later separate patch once the initial ones are reviewed
& committed. And then I'd go with option C.

-- 
Laurynas



More information about the Gcc-patches mailing list