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

Re: Default arguments and FUNCTION_TYPEs


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:


[...]

| | > The obvious place is on the DECL_INITIAL of the PARM_DECLs, but I
| | > don't think they exist until the function is defined.
| | 
| | 
| | I heard once that there was some long-term project of storing function
| | declarations (without corresponding definitions) in a more memory-efficient
| | memory representation. Moving default parameters within PARM_DECL seems a
| | little backward in this respect. And if your memory is right, requiring to
| | build PARM_DECLs just to store default arguments would be even worse.
| 
| I don't see why, it is backward -- we still need to build the
| PARM_DECLs default arguments or not.

Consider PR c++/17395.  My guess is that is partly because we do not
build the PARM_DECLs (and their associated scope) early enough.

-- Gaby


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