This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33086] warn for read-only uninitialized variables passed as arguments
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Aug 2007 10:59:23 -0000
- Subject: [Bug middle-end/33086] warn for read-only uninitialized variables passed as arguments
- References: <bug-33086-13511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-16 10:59 -------
> At least for languages where 'const' is actually enforced
There is none, unless you are taking about fortran "in" arguments. So we need
to mark such argument as special.
Now if you have the full program (or at least the containts of use function),
and you can prove it never writes to the incoming pointer argument, then you
can warn but only then.
In C and C++ you can never tell without the body of use.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|24639 |
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33086