Mercurial > hg > CbC > CbC_gcc
diff gcc/fortran/cpp.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/fortran/cpp.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/fortran/cpp.c Thu Oct 25 07:37:49 2018 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2017 Free Software Foundation, Inc. +/* Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of GCC. @@ -142,8 +142,9 @@ static void cb_ident (cpp_reader *, source_location, const cpp_string *); static void cb_used_define (cpp_reader *, source_location, cpp_hashnode *); static void cb_used_undef (cpp_reader *, source_location, cpp_hashnode *); -static bool cb_cpp_error (cpp_reader *, int, int, rich_location *, - const char *, va_list *) +static bool cb_cpp_diagnostic (cpp_reader *, enum cpp_diagnostic_level, + enum cpp_warning_reason, rich_location *, + const char *, va_list *) ATTRIBUTE_GCC_DIAG(5,0); void pp_dir_change (cpp_reader *, const char *); @@ -504,7 +505,7 @@ cb->line_change = cb_line_change; cb->ident = cb_ident; cb->def_pragma = cb_def_pragma; - cb->error = cb_cpp_error; + cb->diagnostic = cb_cpp_diagnostic; if (gfc_cpp_option.dump_includes) cb->include = cb_include; @@ -881,10 +882,7 @@ { /* Bring current file to correct line when entering a new file. */ if (map->reason == LC_ENTER) - { - const line_map_ordinary *from = INCLUDED_FROM (line_table, map); - maybe_print_line (LAST_SOURCE_LINE_LOCATION (from)); - } + maybe_print_line (linemap_included_from (map)); if (map->reason == LC_ENTER) flags = " 1"; else if (map->reason == LC_LEAVE) @@ -993,7 +991,7 @@ static int dump_macro (cpp_reader *pfile, cpp_hashnode *node, void *v ATTRIBUTE_UNUSED) { - if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) + if (cpp_user_macro_p (node)) { fputs ("#define ", print.outf); fputs ((const char *) cpp_macro_definition (pfile, node), @@ -1023,9 +1021,11 @@ Returns true if a diagnostic was emitted, false otherwise. */ static bool -cb_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level, int reason, - rich_location *richloc, - const char *msg, va_list *ap) +cb_cpp_diagnostic (cpp_reader *pfile ATTRIBUTE_UNUSED, + enum cpp_diagnostic_level level, + enum cpp_warning_reason reason, + rich_location *richloc, + const char *msg, va_list *ap) { diagnostic_info diagnostic; diagnostic_t dlevel;