Re: [PATCH 2/2] ctype: Avoid GCC note in towctrans_l.c

Sebastian Huber <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hello Andre,

On 27/07/18 12:43, Andre Vieira (lists) wrote:
> On 27/07/18 08:37, Sebastian Huber wrote:
>> The previous version genenerated the following GCC note:
>>
>> towctrans_l.c:44:1: note: offset of packed bit-field 'diff' has changed in GCC 4.4
>>   caseconv_table [] = {
>>   ^~~~~~~~~~~~~~
>>
>> Signed-off-by: Sebastian Huber <[email protected]>
>> ---
>>   newlib/libc/ctype/towctrans_l.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/newlib/libc/ctype/towctrans_l.c b/newlib/libc/ctype/towctrans_l.c
>> index 7b8a23c9c..b829266a4 100644
>> --- a/newlib/libc/ctype/towctrans_l.c
>> +++ b/newlib/libc/ctype/towctrans_l.c
>> @@ -37,8 +37,8 @@ enum {TO1, TOLO, TOUP, TOBOTH};
>>   enum {EVENCAP, ODDCAP};
>>   static struct caseconv_entry {
>>     uint_least32_t first: 21;
>> -  uint_least8_t diff: 8;
>> -  uint_least8_t mode: 2;
>> +  uint_least32_t diff: 8;
>> +  uint_least32_t mode: 2;
>>     int_least32_t delta: 17;
>>   } __attribute__ ((packed))
>>   caseconv_table [] = {
>>
> That fixes it, thanks Sebastian!

would you mind testing Newlib 6158b30e3e9b1b582ae60b15d64e775fa1705483. 
It includes a fix for this bug, some FreeBSD compatibility changes in 
<sys/cdefs.h> and a new configuration option for all targets 
newlib/configure.host. Maybe we can use this commit for a new snapshot. 
The broken ctype support in the latest snapshot introduced by me is not 
really great.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : [email protected]
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.