summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-format.c
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-15 15:10:15 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-15 15:10:15 +0000
commitdc8078a346fcfa8315589cce06808c03a5804d98 (patch)
treeff48278d43446ffb9145fbbac3289b0d898cacfa /gcc/c-family/c-format.c
parentb71839120cfa70f06e5c03d7c9cbb63884a3890b (diff)
downloadgcc-dc8078a346fcfa8315589cce06808c03a5804d98.tar.gz
2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054 gcc/ * diagnostic.c (build_message_string): Make it extern. * diagnostic.h (build_message_string): Make it extern. c-family/ * c-format.c: Handle Fortran flags. fortran/ * gfortran.h: Define GCC_DIAG_STYLE. (gfc_diagnostics_init,gfc_warning_cmdline): Declare. * trans-array.c: Include gfortran.h before diagnostic-core.h. * trans-expr.c: Likewise. * trans-openmp.c: Likewise. * trans-const.c: Likewise. * trans.c: Likewise. * trans-types.c: Likewise. * f95-lang.c: Likewise. * trans-decl.c: Likewise. * trans-io.c: Likewise. * trans-intrinsic.c: Likewise. * error.c: Include diagnostic.h and diagnostic-color.h. (gfc_diagnostic_build_prefix): New. (gfc_diagnostic_starter): New. (gfc_diagnostic_finalizer): New. (gfc_warning_cmdline): New. (gfc_diagnostics_init): New. * gfc-diagnostic.def: New. * options.c (gfc_init_options): Call gfc_diagnostics_init. (gfc_post_options): Use gfc_warning_cmdline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-format.c')
-rw-r--r--gcc/c-family/c-format.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
index eeefce883d4..9f541f52525 100644
--- a/gcc/c-family/c-format.c
+++ b/gcc/c-family/c-format.c
@@ -510,11 +510,7 @@ static const format_flag_pair gcc_diag_flag_pairs[] =
#define gcc_tdiag_flag_pairs gcc_diag_flag_pairs
#define gcc_cdiag_flag_pairs gcc_diag_flag_pairs
#define gcc_cxxdiag_flag_pairs gcc_diag_flag_pairs
-
-static const format_flag_pair gcc_gfc_flag_pairs[] =
-{
- { 0, 0, 0, 0 }
-};
+#define gcc_gfc_flag_pairs gcc_diag_flag_pairs
static const format_flag_spec gcc_diag_flag_specs[] =
{
@@ -529,6 +525,7 @@ static const format_flag_spec gcc_diag_flag_specs[] =
#define gcc_tdiag_flag_specs gcc_diag_flag_specs
#define gcc_cdiag_flag_specs gcc_diag_flag_specs
#define gcc_cxxdiag_flag_specs gcc_diag_flag_specs
+#define gcc_gfc_flag_specs gcc_diag_flag_specs
static const format_flag_spec scanf_flag_specs[] =
{
@@ -741,7 +738,7 @@ static const format_char_info gcc_gfc_char_table[] =
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
- { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "cR", NULL },
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "cR", NULL },
/* gfc conversion specifiers. */
@@ -750,6 +747,8 @@ static const format_char_info gcc_gfc_char_table[] =
/* This will require a "locus" at runtime. */
{ "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL },
+ /* These will require nothing. */
+ { "<>",0, STD_C89, NOARGUMENTS, "", "", NULL },
{ NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
@@ -846,8 +845,8 @@ static const format_kind_info format_types_orig[] =
0, 0, 'p', 0, 'L', 0,
NULL, &integer_type_node
},
- { "gcc_gfc", gcc_gfc_length_specs, gcc_gfc_char_table, "", NULL,
- NULL, gcc_gfc_flag_pairs,
+ { "gcc_gfc", gcc_gfc_length_specs, gcc_gfc_char_table, "q+#", NULL,
+ gcc_gfc_flag_specs, gcc_gfc_flag_pairs,
FMT_FLAG_ARG_CONVERT,
0, 0, 0, 0, 0, 0,
NULL, NULL