This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] manage dom-walk_data initialization and finalization with constructors and destructors
- From: Mike Stump <mikestump at comcast dot net>
- To: Michael Matz <matz at suse dot de>
- Cc: Jeff Law <law at redhat dot com>, Trevor Saunders <tsaunders at mozilla dot com>, Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Sep 2013 10:11:59 -0700
- Subject: Re: [PATCH] manage dom-walk_data initialization and finalization with constructors and destructors
- Authentication-results: sourceware.org; auth=none
- References: <1378264562-30803-1-git-send-email-tsaunders at mozilla dot com> <CAFiYyc2WMqt7b=riv_3+LUDQ=+OjycgEqK+L8afjPcaVzU9Wag at mail dot gmail dot com> <20130904145911 dot GC17620 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <522759C8 dot 5040802 at redhat dot com> <20130911000350 dot GA28492 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <52389CB1 dot 60504 at redhat dot com> <5239126A dot 6010702 at redhat dot com> <alpine dot LNX dot 2 dot 00 dot 1309181640400 dot 9949 at wotan dot suse dot de> <5239D985 dot 4080205 at redhat dot com> <alpine dot LNX dot 2 dot 00 dot 1309181849550 dot 9949 at wotan dot suse dot de> <523A7C15 dot 60508 at redhat dot com> <alpine dot LNX dot 2 dot 00 dot 1309191452590 dot 9949 at wotan dot suse dot de>
On Sep 19, 2013, at 6:23 AM, Michael Matz <matz@suse.de> wrote:
> Me neither, from that perspective it's okay. It's merely that I doubt the
> value of any syntactic privatization like it's implemented in C++, you can
> #define it away, hence the compiler can't make use of that information for
> code generation, and the cognitive value for the developer ("hey I
> shouldn't look at this member from outside") is dubious, as that probably
> is a general rule, no direct data member access from non-members (although
> I have problems with that too).
If we are making engineering decisions on the basis of people being able to say #define private public, well, we are so far off into the weeds as to not be funny.
ODR:
--each definition of D shall consist of the same sequence of tokens;
Just because you see no value in private, doesn't mean others don't. Consider this, It would not be in the language if everyone shared your view.