diff options
author | Richard Guenther <rguenther@suse.de> | 2012-05-10 10:28:31 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-05-10 10:28:31 +0000 |
commit | 8244f25237c68071a0dd992367fa2f4509b010e6 (patch) | |
tree | 46fe3567feaca12ef2d47de549eee4b5330dfaa6 | |
parent | aaea76b3af0ea14e22e1864876ef4cf2537de38a (diff) | |
download | gcc-8244f25237c68071a0dd992367fa2f4509b010e6.zip gcc-8244f25237c68071a0dd992367fa2f4509b010e6.tar.gz gcc-8244f25237c68071a0dd992367fa2f4509b010e6.tar.bz2 |
stor-layout.c (byte_from_pos): Amend comment.
2012-05-10 Richard Guenther <rguenther@suse.de>
* stor-layout.c (byte_from_pos): Amend comment.
From-SVN: r187367
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/stor-layout.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a8814a..8da7a7f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-05-10 Richard Guenther <rguenther@suse.de> + + * stor-layout.c (byte_from_pos): Amend comment. + 2012-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init): diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 842b506..cb47a52 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -798,7 +798,13 @@ bit_from_pos (tree offset, tree bitpos) } /* Return the combined truncated byte position for the byte offset OFFSET and - the bit position BITPOS. */ + the bit position BITPOS. + + These functions operate on byte and bit positions as present in FIELD_DECLs + and assume that these expressions result in no (intermediate) overflow. + This assumption is necessary to fold the expressions as much as possible, + so as to avoid creating artificially variable-sized types in languages + supporting variable-sized types like Ada. */ tree byte_from_pos (tree offset, tree bitpos) |