[PATCH, Fortran] Extend F2003 structure constructor support

Daniel Kraft d@domob.eu
Sun May 11 10:48:00 GMT 2008


Hi,

I've attached a patch and its ChangeLog that makes 
gfc_match_structure_constructor interpret named arguments for structure 
constructors and use default initializers for components not 
explicitelly given a value; I also somewhat rewrote the error handling 
for PRIVATE components both to support named arguments and to give (what 
I believe) more useful error messages including the particular 
component's name that is PRIVATE.

The algorithm(s) used is probably not the most efficient, but I believe 
it is by far fast enough for this usage and tried to make the code as 
clear as possible without unneccessary complication.

I'm not sure about where to insert gfc_notify_std calls; maybe F2003 
notify-std when an argument with name is parsed and possibly also when a 
default value is inserted?  Or is that allowed for -std=f95, too?  I 
will then of course also add tests for these messages as appropriate.

This patch succeeds the test-suite with GNU/Linux-x86-32.

Cheers,
Daniel

-- 
Done:     Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
Underway: Ran-Gno-Neu-Fem
To go:    Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080511/804da5eb/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080511/804da5eb/attachment.txt>


More information about the Fortran mailing list