[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add internal-only port structure; move iconv descriptors the
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] Add internal-only port structure; move iconv descriptors there |
Date: |
Mon, 01 Apr 2013 00:06:01 +0200 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
>
>> Mark H Weaver <address@hidden> skribis:
>>
>>> I've come to the conclusion that it is not safe to modify 'scm_t_port'
>>> in 2.0 at all; not even to change the member names. In brief, the
>>> reason has to do with the C11 standard definition of "compatible types",
>>> which ties into the strict aliasing rules. Section 6.2.7 of C11 spells
>>> out what it means for two structures declared in separate translation
>>> units to be compatible, and among other things their member names must
>>> be the same.
>>
>> I can’t imagine how changing the *name* of a member could change
>> something to the structure’s layout in practice.
>
> It doesn't change the structure's layout. However, it could cause
> link-time optimization to break our code.
Ah right, makes sense.
>>> +#define scm_gc_typed_calloc(t) ((t *) scm_gc_calloc (sizeof (t), #t))
>>
>> Not really convinced by this, but hey. Ideally, this would need to go
>> in the manual too.
>
> Maybe talk to Andy about it? It was his suggestion.
No big deal.
Ludo’.
- Re: Adding new information to scm_t_port (was Re: always O_BINARY?), Ludovic Courtès, 2013/03/01
- Re: Adding new information to scm_t_port (was Re: always O_BINARY?), Mark H Weaver, 2013/03/05
- [PATCH] Add private port structure, and move iconv descriptors there, Mark H Weaver, 2013/03/27
- Re: [PATCH] Add private port structure, and move iconv descriptors there, Ludovic Courtès, 2013/03/27
- Re: [PATCH] Add private port structure, and move iconv descriptors there, Andy Wingo, 2013/03/27
- Re: [PATCH] Add private port structure, and move iconv descriptors there, Mark H Weaver, 2013/03/27
- [PATCH] Add internal-only port structure; move iconv descriptors there, Mark H Weaver, 2013/03/31
- Re: [PATCH] Add internal-only port structure; move iconv descriptors there, Ludovic Courtès, 2013/03/31
- Re: [PATCH] Add internal-only port structure; move iconv descriptors there, Mark H Weaver, 2013/03/31
- Re: [PATCH] Add internal-only port structure; move iconv descriptors there,
Ludovic Courtès <=
- Re: [PATCH] Add private port structure, and move iconv descriptors there, Mark H Weaver, 2013/03/31
- Re: [PATCH] Add private port structure, and move iconv descriptors there, Ludovic Courtès, 2013/03/31