This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[PATCH] Make instrinsic_operators as static.


To ease the review process, I've split one of my old fortran patches in to
smaller pieces.  The patch below makes gfortran's intrinsic_operators[]
global variable static to match.c, and at the same time transforms the
gfc_op2string macro into a real function.  This is a preparatory step for
intrinsic_operators going away completely.  One potential additional
benefit/side-effect is that we can now elect to emit uppercase operator
names, such as ".LT." in error messages should we choose.  Previously, the
diagnostic and parsing machinery were inter-dependent.

The following patch has been tested on x86_64-unknown-linux-gnu with a
full "make bootstrap", including gfortran, and tested with a top-level
"make -k check" with no new failures.

Ok for mainline?


2007-08-19  Roger Sayle  <roger@eyesopen.com>

        * match.c (intrinsic_operators): Make static.
        (gfc_op2string): New function for converting a gfc_intrinsic_op to
        to a "const char*", replacing the macro of the same name.
        * gfortran.h (intrinsic_operators): Delete prototype.
        (gfc_op2string): Replace macro with function prototype.

Roger
--

Attachment: patch2.txt
Description: Text document


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