From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Sat Oct 24 03:58:20 2015
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 8E390358755; Sat, 24 Oct 2015 03:58:20 +0200 (CEST)
Delivered-To: sc22wg14@open-std.org
Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50])
	(using TLSv1 with cipher RC4-SHA (128/128 bits))
	(No client certificate requested)
	by www.open-std.org (Postfix) with ESMTP id 285F33584D7
	for <sc22wg14@open-std.org>; Sat, 24 Oct 2015 03:58:20 +0200 (CEST)
Received: by qgbb65 with SMTP id b65so80819969qgb.2
        for <sc22wg14@open-std.org>; Fri, 23 Oct 2015 18:58:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=message-id:date:from:user-agent:mime-version:to:subject
         :content-type:content-transfer-encoding;
        bh=SuZGcWhgeCAmAxOD03t9XXEWUhCiwuznIX1dUQvB9n8=;
        b=FLGnQZOhNWikrlmz5NSwm+LDnSxRhm8/4j1BfisC1j19kQqKMpokb8l77InhKAV6wC
         CvzJUvXkbPUwA2DQKPSTV4IMYVF37zcwCNqGFZqyWuM5NEeewHcjnBSCzVCPXv/lcUca
         QrH2J6C3liDnX+Pk46IWoQy915RiQeINJzH25/UMPjfYs+GX0N73ck9fQmOEAuqYC8KL
         uwvSSfJvMdUtbFVNzykdXP7F3uOFyOcZwvevrLcucoFeP1FOWduMVyChXnIRRL983v75
         XWBuD256+2lOjBbwRe8NSNji2ZlDYHMtxDE92Kj6vXIBcFOFYoLfikzOPn54SGF4QTSO
         k1Wg==
X-Received: by 10.140.83.227 with SMTP id j90mr8457546qgd.27.1445651898360;
        Fri, 23 Oct 2015 18:58:18 -0700 (PDT)
Received: from [192.168.0.26] (70-59-0-242.hlrn.qwest.net. [70.59.0.242])
        by smtp.gmail.com with ESMTPSA id p71sm8614802qki.37.2015.10.23.18.58.17
        for <sc22wg14@open-std.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 23 Oct 2015 18:58:17 -0700 (PDT)
Message-ID: <562AE5B8.6080307@gmail.com>
Date: Fri, 23 Oct 2015 19:58:16 -0600
From: Martin Sebor <msebor@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: "sc22wg14@open-std.org" <sc22wg14@open-std.org>
Subject: what's a member-designator?
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

I've been spending some quality time with the offsetof expression
which is defined like so in 7.19 Common definitions <stddef.h>:

       offsetof(type, /member-designator/)

   which expands to an integer constant expression that has type
   size_t, the value of which is the offset in bytes, to the
   structure member (designated by /member-designator/), from
   the beginning of its structure (designated by type). The type
   and member designator shall be such that given

       static type t;

   then the expression &(t./member-designator/) evaluates to
   an address constant. (If the specified member is a bit-field,
   the behavior is undefined.)

/member-designator/ is italicized as a term of the grammar but
isn't defined anywhere in C or in C++ (which shares mostly the
same definition).

This is of interest because the term has been interpreted as
(IIUC) synonymous with identifier by an implementation that
diagnoses offsetof expressions where the /member-designator/
is anything else, such as b.i in

   offsetof (struct A, b.i)

where struct A is defined as

   struct A { struct B { int i; } b; };

Martin

PS This issue has been raised before, in Item 32, N847 - Issues
with CD2 of C99:

   http://www.open-std.org/jtc1/sc22/wg14/www/docs/n847.htm

But I'm not having any luck finding a response.
