This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Extending the core language via a gcc plugin possible?
- From: "U.Mutlu" <um at mutluit dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 18 Jun 2018 02:08:02 +0200
- Subject: 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?