From: rguenth Date: Thu, 10 May 2012 10:28:31 +0000 (+0000) Subject: 2012-05-10 Richard Guenther X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcb068049a6bbfd26c6bc7c67e96d42bc1133cf3;p=thirdparty%2Fgcc.git 2012-05-10 Richard Guenther * stor-layout.c (byte_from_pos): Amend comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187367 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a8814afe102..8da7a7f88e9e 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 842b506ab251..cb47a52b715c 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)