This is the mail archive of the gcc-patches@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]

Re: C++ PATCH: sizeof(expr)


Mark Mitchell wrote:
> But, you removed a useful comment above the call to
> resolve_offset_ref.  It's fine to say that the code belongs in
> resolve_offset_ref, but if so, then the code should move, rather than
> just the comment disappearing.
I think it's a confusing comment. No such equivalent comment occurs on other
calls to build_offset_ref, for instance decay_conversion, build_component_ref,
build_static_cast, build_reinterpret_cast, build_const_cast. I don't
see what's so special about expr_sizeof that it warrants a comment in this
regard. I removed no code around this from expr_sizeof, nor inserted any into
resolve_offset_ref.

The comment itself hints that the next line should be something like
	else if (!pedantic && TREE_CODE (e) == OFFSET_REF)
by it's mention of `being pedantic'. But that's not right.

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
        I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]