This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to extend tree stringification operators namespace
Nathan Sidwell <nathan@acm.org> writes:
| Mark Mitchell wrote:
| > >>>>> gdr <gdr@codesourcery.com> writes:
| >
| > >> Therefore I'm proposing to extend the tree stringification
| > >> operators namespace to include '*', '^', '!', '~', '=', '?',
| > >> '{', '&', '#', '@', '}', '-' whose meanings are as follow.
|
| a little language to specify these flags will need dinking every time we
| add a new flag. And we quckily run out of `obvious' symbols to choose
| from. If we really do need this level of specification, how
| about allowing `*' in the printf specifier to pick up an int parameter
| which specifies the flags directly? Something like
Or use a struct as Mark suggested? I think with his proposal the
number of flags won't be bounded by 32 :-)
| cp_error ("bogus expression `%*E'(, TS_PEDANTIC | TS_CANONICAL, expr);
[...]
| Gaby>A final note: in Nathan's patch the constants are prepended by ERRSTR_
| Gaby>to mean (probably) "error string". As the tree stringification
| Gaby>machinery can be used by any software that needs to turn trees into
| Gaby>strings - not just the error message reporters - I'm proposing to use
| Gaby>TS_ standing for "tree stringification".
| Fine by me -- but that raises the obvious question -- 'Why are they
| in error.c?' :-)
For historical reasons? :-)
But I guess that as soon as the new machinery is fully fonctionnal
we'll move things in the right place.
-- Gaby