c-common.c line 5179: isn't this a nop?

Ian Lance Taylor iant@google.com
Wed May 16 05:47:00 GMT 2007


Matt Thomas <matt@3am-software.com> writes:

> In handle_aligned_attributes in c-common.c, at line 5146, it does
> 
> 	type = &TREE_TYPE (decl);
> 
> Then at 5179 it does
> 
> 	TREE_TYPE (decl) = *type;
> 
> In between, type doesn't change so that's really
> 
> 	TREE_TYPE (decl) = * &TREE_TYPE (decl);
> or
> 	TREE_TYPE (decl) = TREE_TYPE (decl);
> 
> now that seems redundant to me.  Maybe it was supposed to be
> something else.

I agree that this is redundant.  It's because of how the code was
changed when attribute handling was broken up from a single big
function to a table of function pointers:

2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>

	Table-driven attributes.

Ian



More information about the Gcc mailing list