------- Comment #3 from madcoder at debian dot org  2007-05-11 09:32 -------
Subject: Re:  Please provide an "inout" attribute for function parameters.

On Thu, May 10, 2007 at 10:00:51PM -0000, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #2 from pinskia at gcc dot gnu dot org  2007-05-10 23:00 
> -------
> What are you doing, writting Fortran code in C? :) (really I am serious about
> this one too)
>
> > It seems that even if the argument is declared const foo_t * gcc assumes the
> > function will initialize the data, which is rather ... erm... strange.
>
> Why do you think it is strange? you can remove the const part in do_bar
> anyways.

  I know you *can* but it's very bad practice, and when you're a warning
freak like I am, I won't mark a variable "const" if the function will
eventually change it. Anyways, that does not changes my request, that is
to mark the fact that the data must be pre-initialized before use to
make -Wuninitialized even more useful :)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31893

Reply via email to