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]
Other format: [Raw text]

[C++ PATCH] Improve enum handling - take 2



On Wednesday, January 8, 2003, at 04:36 PM, Jason Merrill wrote:

I would think that you could also defer setting the type of the enumerator
values until template instantiation time; rather than move it into the big
loop, just swap it with the if (processing_template_decl) bit.
OK, how about this patch? I bootstrapped on powerpc-darwin and did not find
new g++ regression.

cp/ChangeLog
* decl.c (finish_enum): Merge two 'for' loops. copy value node if required.
Postpone enum setting for template decls.
(build_enumerator): Delay copying value node until finish_enum(). Remove
#if 0'ed code.
* pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
(tsubst_copy): Add check for enum type.

-Devang

Attachment: build_enum.diff
Description: Binary data


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