On Tue, 2005-03-08 at 09:06 -0800, Mark Mitchell wrote: > Nathan Sidwell wrote: > > > Notice that the last specified argument 'union U' has no name. when > > compiled for ia64-hp-hpux11.23 with -mlp64 this ICEs because of this > > bit of code in assign_parm_find_data_types > > > > /* Set LAST_NAMED if this is last named arg before last anonymous > > args. */ > > if (current_function_stdarg) > > { > > tree tem; > > for (tem = TREE_CHAIN (parm); tem; tem = TREE_CHAIN (tem)) > > if (DECL_NAME (tem)) > > break; > > if (tem == 0) > > data->last_named = true; > > } > > > > That triggers on the float argument, not union. Naming the union > > makes it trigger on the union, and compilation succeeds. This is > > clearly wrong. > > > > The comment doesn't make sense, arguments with and without names can > > be freely intermixed (in C++), and should not affect the ABI. As this > > is to do with varadic parameters, is this really talking about the > > last typed argument before the varadic ones? > > Yes, it must be. As you say, the current code is just plain bogus; the > idea that the ABI would change for a C++ function depending on whether > or not the argument is named is wrong, as, for example, function > pointers would cease to work. I suspect this is a relic of our old > implementation of varargs, and depended on the fact that C functions do > not have unnamed arguments. FWIW, there is actually a system which varies its ABI based on whether or not an argument is named -- my old favorite, the 32bit PA SOM ABI behaves in this manner. In fact, I believe it is the only port which gives a hoot about this kind of thing.
Is it lame, absolutely. It was one of the many annoying discoveries in my decade of PA hacking. Jeff