From: Tobias Burnus Date: Thu, 20 Sep 2012 20:49:20 +0000 (+0200) Subject: re PR fortran/54599 (Issues found in gfortran by the Coverity Scan) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dee1c2653129a8c71d9ef113729476cba1ae5d9d;p=gcc.git re PR fortran/54599 (Issues found in gfortran by the Coverity Scan) 2012-09-20 Tobias Burnus PR fortran/54599 * cpp.c (print_line): Properly handle extern C. From-SVN: r191590 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2f405b86bf0..6679a15ae20 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-09-20 Tobias Burnus + + PR fortran/54599 + * cpp.c (print_line): Properly handle extern C. + 2012-09-20 Martin Jambor * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c index 2f18893313b..c45af39ef61 100644 --- a/gcc/fortran/cpp.c +++ b/gcc/fortran/cpp.c @@ -822,6 +822,7 @@ print_line (source_location src_loc, const char *special_flags) size_t to_file_len; unsigned char *to_file_quoted; unsigned char *p; + int sysp; loc = expand_location (src_loc); to_file_len = strlen (loc.file); @@ -838,9 +839,10 @@ print_line (source_location src_loc, const char *special_flags) print.src_line == 0 ? 1 : print.src_line, to_file_quoted, special_flags); - if (loc.sysp == 2) + sysp = in_system_header_at (src_loc); + if (sysp == 2) fputs (" 3 4", print.outf); - else if (loc.sysp == 1) + else if (sysp == 1) fputs (" 3", print.outf); putc ('\n', print.outf);