diff options
| author | brolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-08-20 10:29:22 +0000 |
|---|---|---|
| committer | brolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-08-20 10:29:22 +0000 |
| commit | 5ddef640bef4f1c6a0c15ce3b25a499eb8180bb0 (patch) | |
| tree | 9ce1e3e1880ba47f3968473b011f4d1144753950 | |
| parent | a4bf57aaa4b0e3c1f19cea4bbe4edab0b3131e25 (diff) | |
| download | ppe42-gcc-5ddef640bef4f1c6a0c15ce3b25a499eb8180bb0.tar.gz ppe42-gcc-5ddef640bef4f1c6a0c15ce3b25a499eb8180bb0.zip | |
Thu Aug 20 13:15:11 1998 Dave Brolley <brolley@cygnus.com>
* stor-layout.c (layout_type): Compute TYPE_SIZE_UNIT correctly for
arrays of bits.
* cpplib.c (cpp_define): Handle macros with parameters.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21872 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cpplib.c | 6 | ||||
| -rw-r--r-- | gcc/stor-layout.c | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c159968997..16292f4ea3a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Aug 20 13:15:11 1998 Dave Brolley <brolley@cygnus.com> + + * stor-layout.c (layout_type): Compute TYPE_SIZE_UNIT correctly for + arrays of bits. + * cpplib.c (cpp_define): Handle macros with parameters. + Wed Aug 19 21:33:19 1998 David Edelsohn <edelsohn@mhpcc.edu> * rs6000.c (rs6000_output_load_toc_table): Use ld for 64-bit. diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 5b1034935ff..b9ded523c1d 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -534,6 +534,12 @@ cpp_define (pfile, str) } while (is_idchar[*++p]) ; + if (*p == '(') { + while (is_idchar[*++p] || *p == ',' || is_hor_space[*p]) + ; + if (*p++ != ')') + p = (U_CHAR *) str; /* Error */ + } if (*p == 0) { buf = (U_CHAR *) alloca (p - buf + 4); diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index b44a411e9da..3c7cf23d7d3 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -834,8 +834,12 @@ layout_type (type) size directly, rather than do some division thing below. This optimization helps Fortran assumed-size arrays (where the size of the array is determined at runtime) - substantially. */ - if (TYPE_SIZE_UNIT (element) != 0) + substantially. + Note that we can't do this in the case where the size of + the elements is one bit since TYPE_SIZE_UNIT cannot be + set correctly in that case. */ + if (TYPE_SIZE_UNIT (element) != 0 + && element_size != integer_one_node) { TYPE_SIZE_UNIT (type) = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (element), length); |

