This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/33086] warn for read-only uninitialized variables passed as arguments



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]