aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/scanner.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-10-28 21:56:24 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-10-28 21:56:24 +0000
commita56abdccae1807251bcec03f8979fedba8edbf95 (patch)
treeac382e936a957c83179b3ff8865871b3b99a5790 /gcc/fortran/scanner.c
parent99630555c2224e544a11928dcbc89e4a3f5ff1e7 (diff)
downloadgcc-a56abdccae1807251bcec03f8979fedba8edbf95.zip
gcc-a56abdccae1807251bcec03f8979fedba8edbf95.tar.gz
gcc-a56abdccae1807251bcec03f8979fedba8edbf95.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
2014-10-28 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.h (gfc_warning_cmdline): Rename as gfc_warning_now_2. (gfc_error_cmdline): Rename as gfc_error_now_2. * error.c (gfc_diagnostic_build_locus_prefix): Remove trailing space. (gfc_diagnostic_starter): Add space between locus and prefix. (gfc_warning_now_2): Renamed from gfc_warning_cmdline. (gfc_error_now_2): Renamed from gfc_error_cmdline. * scanner.c (add_path_to_list): Use gfc_warning_now_2. (load_line): Likewise. (load_file): Likewise. * options.c (gfc_post_options): Update all renamed functions. From-SVN: r216812
Diffstat (limited to 'gcc/fortran/scanner.c')
-rw-r--r--gcc/fortran/scanner.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index 757037c..2c0d4c3 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -324,16 +324,16 @@ add_path_to_list (gfc_directorylist **list, const char *path,
if (stat (q, &st))
{
if (errno != ENOENT)
- gfc_warning_cmdline ("Include directory %qs: %s", path,
- xstrerror(errno));
+ gfc_warning_now_2 ("Include directory %qs: %s", path,
+ xstrerror(errno));
else if (warn)
- gfc_warning_cmdline (OPT_Wmissing_include_dirs,
- "Nonexistent include directory %qs", path);
+ gfc_warning_now_2 (OPT_Wmissing_include_dirs,
+ "Nonexistent include directory %qs", path);
return;
}
else if (!S_ISDIR (st.st_mode))
{
- gfc_warning_cmdline ("%qs is not a directory", path);
+ gfc_warning_now_2 ("%qs is not a directory", path);
return;
}
@@ -1476,11 +1476,11 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char)
&& !seen_printable && seen_ampersand)
{
if (pedantic)
- gfc_error_now ("'&' not allowed by itself in line %d",
- current_line);
+ gfc_error_now_2 ("%<&%> not allowed by itself in line %d",
+ current_line);
else
- gfc_warning_now ("'&' not allowed by itself in line %d",
- current_line);
+ gfc_warning_now_2 ("%<&%> not allowed by itself in line %d",
+ current_line);
}
break;
}
@@ -1538,8 +1538,8 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char)
&& current_line != linenum)
{
linenum = current_line;
- gfc_warning_now ("Nonconforming tab character in column %d "
- "of line %d", i+1, linenum);
+ gfc_warning_now_2 ("Nonconforming tab character in column %d "
+ "of line %d", i+1, linenum);
}
while (i < 6)
@@ -1922,7 +1922,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
input = gfc_open_file (realfilename);
if (input == NULL)
{
- gfc_error_cmdline ("Can't open file %qs", filename);
+ gfc_error_now_2 ("Can't open file %qs", filename);
return false;
}
}