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

Extending the core language via a gcc plugin possible?


Hi,
is it possible to add a private extension to the
core language (C/C++) by writing a gcc plugin?

The extension in mind is something like this
[variable_definitions;]

Later I want this be possible also inside statement headers, for example
for ([double d = 1.0; bool f = false;] size_t i = 0; i < vec.size(); ++i)
  ...

The scope of the so-defined variables shall be the same scope they are in,
ie. in the for-loop case just the scope of the for-loop itself, much like the case with i.

Any way?


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