Mercurial > hg > CbC > CbC_gcc
comparison gcc/go/go-gcc-diagnostics.cc @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // go-gcc-diagnostics.cc -- GCC implementation of go diagnostics interface. | 1 // go-gcc-diagnostics.cc -- GCC implementation of go diagnostics interface. |
2 // Copyright (C) 2016-2018 Free Software Foundation, Inc. | 2 // Copyright (C) 2016-2020 Free Software Foundation, Inc. |
3 // Contributed by Than McIntosh, Google. | 3 // Contributed by Than McIntosh, Google. |
4 | 4 |
5 // This file is part of GCC. | 5 // This file is part of GCC. |
6 | 6 |
7 // GCC is free software; you can redistribute it and/or modify it under | 7 // GCC is free software; you can redistribute it and/or modify it under |
22 #include "go-diagnostics.h" | 22 #include "go-diagnostics.h" |
23 | 23 |
24 void | 24 void |
25 go_be_error_at(const Location location, const std::string& errmsg) | 25 go_be_error_at(const Location location, const std::string& errmsg) |
26 { | 26 { |
27 source_location gcc_loc = location.gcc_location(); | 27 location_t gcc_loc = location.gcc_location(); |
28 error_at(gcc_loc, "%s", errmsg.c_str()); | 28 error_at(gcc_loc, "%s", errmsg.c_str()); |
29 } | 29 } |
30 | 30 |
31 | 31 |
32 void | 32 void |
33 go_be_warning_at(const Location location, | 33 go_be_warning_at(const Location location, |
34 int opt, const std::string& warningmsg) | 34 int opt, const std::string& warningmsg) |
35 { | 35 { |
36 source_location gcc_loc = location.gcc_location(); | 36 location_t gcc_loc = location.gcc_location(); |
37 warning_at(gcc_loc, opt, "%s", warningmsg.c_str()); | 37 warning_at(gcc_loc, opt, "%s", warningmsg.c_str()); |
38 } | 38 } |
39 | 39 |
40 void | 40 void |
41 go_be_fatal_error(const Location location, | 41 go_be_fatal_error(const Location location, |
42 const std::string& fatalmsg) | 42 const std::string& fatalmsg) |
43 { | 43 { |
44 source_location gcc_loc = location.gcc_location(); | 44 location_t gcc_loc = location.gcc_location(); |
45 fatal_error(gcc_loc, "%s", fatalmsg.c_str()); | 45 fatal_error(gcc_loc, "%s", fatalmsg.c_str()); |
46 } | 46 } |
47 | 47 |
48 void | 48 void |
49 go_be_inform(const Location location, | 49 go_be_inform(const Location location, |
50 const std::string& infomsg) | 50 const std::string& infomsg) |
51 { | 51 { |
52 source_location gcc_loc = location.gcc_location(); | 52 location_t gcc_loc = location.gcc_location(); |
53 inform(gcc_loc, "%s", infomsg.c_str()); | 53 inform(gcc_loc, "%s", infomsg.c_str()); |
54 } | 54 } |
55 | 55 |
56 void | 56 void |
57 go_be_get_quotechars(const char** open_qu, const char** close_qu) | 57 go_be_get_quotechars(const char** open_qu, const char** close_qu) |