This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
-----Original Message----- From: Joseph S. Myers Sent: 13 October 2004 15:10
Without "restrict" the only relevant undefined behavior is if the object is *defined* with qualified type (6.7.3#5). This can apply with static or automatic storage duration declarations such as
struct { const char x } y = { z };
but cannot apply to an object of allocated storage duration.
Huh? Are you saying that in:
typedef struct { const char x } AA;
AA *py1, py2; AA y1 = { z };
py1 = malloc (sizeof *py2); py2 = &y1;
it is valid to say
*(char *)(&py1->x) = '?';
but not valid to say
*(char *)(&py2->x) = '?';
static const int x = 3; static int y = 4;
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |