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

Re: gthr*.h -vs- #pragma weak


> In at least one case (an embedded MIPS port of the Java compiler which
> used our own thread system) this turned out to be a problem.  Hacking
> in a definition of HANDLE_SYSV_PRAGMA was easy enough, but I don't
> understand why this is even optional.  Does it hurt to always allow
> these pragmas?  (I realize that weak symbols aren't available
> everywhere.  However in this case the target was using ELF, so that
> wasn't an issue.)

HANDLE_SYSV_PRAGMA used to override HANDLE_PRAGMA, i.e. make it impossible
to use any truely target specific pragmas.
This has been fixed recently.

Tue Aug 18 17:40:27 1998  Nick Clifton  <nickc@cygnus.com>
        * c-common.c (decl_attributes): Evaluate INSERT_ATTRIBUTES, if
        it is defined, before parsing any atributes.
        * c-lex.c (check_newline): Invoke both HANDLE_PRAGMA and
        HANDLE_SYSV_PRAGMA if they are defined.  Pass three arguments
        to HANDLE_PRAGMA: a getc() function, an ungetc() function, and
        the name of the pragma to be parsed.  Issue a warning, if
        asked to do so, if the pragma is not handled.
        (handle_sysv_pragma): Expect a return value from
        handle_pragma_token().
        (pragma_getc): New function: Local version of the GETC macro.
        (pragma_ungetc): New function: Local version of the UNGETC macro.
        * c-pragma.c (handle_pragma_token):  Make function return a
        boolean, specifying whether the pragma has been successfully
        and completely parsed or not.  Move warning about unknown
        pragmas into c-lex.c
        * c-pragma.h: Change prototype for handle_pragma_token().
        * varasm.c (handle_pragma_weak): Only define this function if
        HANDLE_PRAGMA_WEAK is defined.
        * tm.texi (HANDLE_PRAGMA): Document new version of this macro.
        (INSERT_ATTRIBUTES):  Document this new macro.


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