[patch,fortran] Revamp type enumerators

Jerry DeLisle jvdelisle@frontier.com
Sun Oct 17 11:02:00 GMT 2010


Hi all,

This patch gets rid of the GFC_DTYPE_X enumerators (dtype) used in the IO 
Library and replaces this with the BT_X enumerators (bt) so that they do not 
have to be trasnslated on the fly at runtime with switch statements.

The change ends up rippling around, but with this patch there is now one place 
where the BT_X enumerators are defined for both the FE and runtime libraries. 
The definition is placed in gcc/fortran/libgfortran.h which already contains 
other common definitions. (I will also be putting in the same file a common 
defintion for format tokens later).

Regression tested on x86-64-linux-gnu.

OK for trunk?

Regards,

Jerry

2010-10-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* gfortran.h: Remove definition of bt enumerator.
	* libgfortran.h: Add bt enumerator type alighned with defintion.
	Remove the dtype enumerator, no longer used.
	previously given in libgfortran/io.h
	* trans-types.c: Use new bt enumerator.
	* trans-io.c: Likewise.

2010-10-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/io.h: Remove definition of the BT enumerator.
	* libgfortran.h: Replace GFC_DTYPE enumerator with BT.
	* intrinsics/iso_c_generated_procs.c: Likewise
	* intrinsics/date_and_time.c: Likewise.
	* intrinsics/iso_c_binding.c: Likewise.
	* io/list_read.c: Likewise.
	* io/transfer.c: Likewise.
	* io/write.c: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dtype.diff
Type: text/x-patch
Size: 26441 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101017/13842419/attachment.bin>


More information about the Fortran mailing list