This is the mail archive of the gcc-patches@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]

[patch soft-fp]: Possibly use of uninitialized variables


Hello,

This fixes some potential uses of unitialized variables, which I got
reported by gcc 3.4.4 while bootstrap and it seems right by its
detection.

ChangeLog

2010-10-18  Kai Tietz

        * config/soft-fp/op-common.h (_FP_DECL): Initialize
        variable by zero.

Tested for x86_64-w64-mingw32, and i686-pc-mingw32. Ok for apply?

Regards,
Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Index: op-common.h
===================================================================
--- op-common.h (revision 165609)
+++ op-common.h (working copy)
@@ -31,7 +31,7 @@
    MA 02110-1301, USA.  */

 #define _FP_DECL(wc, X)                                                \
-  _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e;      \
+  _FP_I_TYPE X##_c __attribute__((unused)), X##_s = 0, X##_e = 0;      \
   _FP_FRAC_DECL_##wc(X)

 /*


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