This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,fortran] *The* ISO C Binding patch
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 Jun 2007 20:37:45 +0200
- Subject: Re: [PATCH,fortran] *The* ISO C Binding patch
- References: <20070624051848.GA28624@troutmask.apl.washington.edu> <jeejk14oz8.fsf@sykes.suse.de>
+NAMED_CHARCST (ISOCBINDING_NULL_CHAR, "c_null_char", '\0')
+NAMED_CHARCST (ISOCBINDING_ALERT, "c_alert", '\a')
+NAMED_CHARCST (ISOCBINDING_BACKSPACE, "c_backspace", '\b')
+NAMED_CHARCST (ISOCBINDING_FORM_FEED, "c_form_feed", '\f')
+NAMED_CHARCST (ISOCBINDING_NEW_LINE, "c_new_line", '\n')
+NAMED_CHARCST (ISOCBINDING_CARRIAGE_RETURN, "c_carriage_return",
'\r')
+NAMED_CHARCST (ISOCBINDING_HORIZONTAL_TAB, "c_horizontal_tab", '\t')
+NAMED_CHARCST (ISOCBINDING_VERTICAL_TAB, "c_vertical_tab", '\v')
Shouldn't those use the target character set?
Indeed they should. I thought I had taken care of it when I worked on
the F-E branch, but apparently I never committed it (or never got it
fully working).
For Steve : first, I'm sorry that I don't have time to deal with it
myself; second, the function you need for the translation is
lang_hooks.to_target_charset, you can see it used in trans-expr.c
(gfc_trans_string_copy), it's simply a matter of replacing '\b' with
lang_hooks.to_target_charset('\b'), and possibly #include
"langhooks.h" at the beginning of the file concerned.
FX