diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2002-02-10 18:12:41 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-02-10 18:12:41 -0800 |
commit | 65739e62e4c32be813d518e943249b2c9a3512e3 (patch) | |
tree | d795f195370eebc1bc2d0238f2bdb8e50e504bea | |
parent | 247cb9df4b2132bcc0ef4ea4b031e75fd2e19fee (diff) | |
download | gcc-65739e62e4c32be813d518e943249b2c9a3512e3.tar.gz |
re PR c++/5624 (Strange bug with preprocessed file containing structs)
PR c++/5624
* tree.c (append_random_chars): Don't abort if main_input_filename
does not exist.
From-SVN: r49662
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/tree.c | 17 |
2 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9d466a9f28..35a872893bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,11 +1,16 @@ +2002-02-10 Richard Henderson <rth@redhat.com> + + PR c++/5624 + * tree.c (append_random_chars): Don't abort if main_input_filename + does not exist. + 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com> * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. 2002-02-10 Kazu Hirata <kazu@hxi.com> - * config/h8300/h8300.md (pushhi1_h8300): Correct the mode - used. + * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used. (pushhi1): Likewise. 2002-02-10 John David Anglin <dave@hiauly1.hia.nrc.ca> diff --git a/gcc/tree.c b/gcc/tree.c index d664866301d..e2829491ca4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4491,16 +4491,23 @@ append_random_chars (template) compiles since this can cause bootstrap comparison errors. */ if (stat (main_input_filename, &st) < 0) - abort (); - - /* In VMS, ino is an array, so we have to use both values. We - conditionalize that. */ + { + /* This can happen when preprocessed text is shipped between + machines, e.g. with bug reports. Assume that uniqueness + isn't actually an issue. */ + value = 1; + } + else + { + /* In VMS, ino is an array, so we have to use both values. We + conditionalize that. */ #ifdef VMS #define INO_TO_INT(INO) ((int) (INO)[1] << 16 ^ (int) (INO)[2]) #else #define INO_TO_INT(INO) INO #endif - value = st.st_dev ^ INO_TO_INT (st.st_ino) ^ st.st_mtime; + value = st.st_dev ^ INO_TO_INT (st.st_ino) ^ st.st_mtime; + } } template += strlen (template); |