From: Richard Guenther Date: Thu, 10 May 2012 10:28:31 +0000 (+0000) Subject: stor-layout.c (byte_from_pos): Amend comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8244f25237c68071a0dd992367fa2f4509b010e6;p=gcc.git stor-layout.c (byte_from_pos): Amend comment. 2012-05-10 Richard Guenther * stor-layout.c (byte_from_pos): Amend comment. From-SVN: r187367 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a8814afe10..8da7a7f88e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-05-10 Richard Guenther + + * stor-layout.c (byte_from_pos): Amend comment. + 2012-05-10 Rainer Orth * doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init): diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 842b506ab25..cb47a52b715 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)