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]

Re: [IFUNC] PATCH: Add an ifunc attribute


On 07/02/2009 08:50 AM, Mark Mitchell wrote:
The other would be to use the same rules that apply when
performing a cast. For example:

mangle((void (*)())f);

Not being a C++ programmer, I didn't know something like that would work; I kinda like it.

The suggestion I had been about to post was

  mangle_type(foo, typename)
  mangle_type("bar", typename)

where the first argument can be either an identifier or a string,
and typename can be anything that names a type, e.g. a typedef or
template argument or suchlike.

The idea being the string/identifier would be used as the base
name of the function, with the rest of the goop coming from the
given type.  One could then create mangled names that don't
correspond to any function declaration in scope.


r~



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