diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-03-16 13:54:23 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-03-16 13:54:23 +0000 |
commit | 46ea50cb66f3edc9f5f474067e61bfe39c41cb06 (patch) | |
tree | a20e4efde41319867b70c6ab9c22c79a5f13b973 /gcc | |
parent | 012c387f58d28ad20648c1ea3ebefa2b86424b6f (diff) | |
download | gcc-46ea50cb66f3edc9f5f474067e61bfe39c41cb06.zip gcc-46ea50cb66f3edc9f5f474067e61bfe39c41cb06.tar.gz gcc-46ea50cb66f3edc9f5f474067e61bfe39c41cb06.tar.bz2 |
c-typeck.c (build_component_ref): Turn "for" into "do ..
* c-typeck.c (build_component_ref): Turn "for" into "do .. while"
to avoid "may be used uninitialized" warning on ia64-hpux.
* config/ia64/ia64-c.c: Include "tm_p.h" for function prototypes.
From-SVN: r64434
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-typeck.c | 5 | ||||
-rw-r--r-- | gcc/config/ia64/ia64-c.c | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8fb4cd..ad26846 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-16 Roger Sayle <roger@eyesopen.com> + + * c-typeck.c (build_component_ref): Turn "for" into "do .. while" + to avoid "may be used uninitialized" warning on ia64-hpux. + * config/ia64/ia64-c.c: Include "tm_p.h" for function prototypes. + 2003-03-16 Andreas Jaeger <aj@suse.de> * configure.in: Improve check for memcheck.h. diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 0d52a7c..bb696e8 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1152,7 +1152,7 @@ build_component_ref (datum, component) end does it - by giving the anonymous entities each a separate name and type, and then have build_component_ref recursively call itself. We can't do that here. */ - for (; field; field = TREE_CHAIN (field)) + do { tree subdatum = TREE_VALUE (field); @@ -1169,7 +1169,10 @@ build_component_ref (datum, component) warn_deprecated_use (subdatum); datum = ref; + + field = TREE_CHAIN (field); } + while (field); return ref; } diff --git a/gcc/config/ia64/ia64-c.c b/gcc/config/ia64/ia64-c.c index bddfc22..b95c21d 100644 --- a/gcc/config/ia64/ia64-c.c +++ b/gcc/config/ia64/ia64-c.c @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ #include "c-common.h" #include "c-pragma.h" #include "toplev.h" +#include "tm_p.h" static void ia64_hpux_add_pragma_builtin PARAMS ((tree func)); |