[PATCH] New pragma handling mechanism

Joseph S. Myers joseph@codesourcery.com
Tue Apr 5 19:45:00 GMT 2005


On Tue, 5 Apr 2005, Dmitry Kurochkin wrote:

> Frontend can handle such pragma interally, or call a handler (if there
> is one). To allow pragma handlers access tokens in a uniform manner,
> frontend provide a function for getting tokens. There are options to
> allow pragma name and body macro expansion.

You appear to have changed the interface used for target pragmas - which 
is documented in tm.texi - without updating the documentation or all 
targets.  You need to update the documentation, and to fix all targets.  
You should test that cc1 builds OK for all targets with target pragmas, 
and if possible do a full bootstrap and testsuite run without regressions 
on one target with target pragmas which are tested in the testsuite (which 
I think means Solaris or Darwin).

As you are changing the target pragma interfaces, there is no longer any 
need for c_register_pragma and c_register_pragma_with_expansion to be 
separate so they should be merged into one interface taking a flag 
parameter, fixing bug 18637.

Does your patch fix bug 18638 (allowing macro expansion for pragmas where 
it is appropriate for C++)?  If so, include the PR number in the ChangeLog 
entries (along with 18637); I can prepare and run a test after this patch 
is in to make sure the Solaris pragmas in question do get macro expansion.

>         * gcc/c-lex.c (c_lex_with_flags): Change CPP_PRAGMA case.
[...]

You should also arrange the ChangeLog entries by directory in the usual 
GCC way, i.e. show separately exactly what would go in each ChangeLog 
without the "gcc/" or other directory prefix for that directory.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)



More information about the Gcc-patches mailing list