This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31893] Please provide an "inout" attribute for function parameters.
- From: "madcoder at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2007 08:32:56 -0000
- Subject: [Bug c/31893] Please provide an "inout" attribute for function parameters.
- References: <bug-31893-13675@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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