-
- Downloads
diagnostics: Use an inline function rather than hardcoding <built-in> string
The string "<built-in>" is hard-coded in several places throughout the diagnostics code, and in some of those places, it is used incorrectly with respect to internationalization. (Comparing a translated string to an untranslated string.) The error is not currently observable in any output GCC actually produces, hence no testcase added here, but it's worth fixing, and also, I am shortly going to add a new such string and want to avoid hardcoding that one in similar places. gcc/c-family/ChangeLog: * c-opts.cc (c_finish_options): Use special_fname_builtin () rather than a hard-coded string. gcc/ChangeLog: * diagnostic.cc (diagnostic_get_location_text): Use special_fname_builtin () rather than a hardcoded string (which was also incorrectly left untranslated previously.) * input.cc (special_fname_builtin): New function. (expand_location_1): Use special_fname_builtin () rather than a hard-coded string. (test_builtins): Likewise. * input.h (special_fname_builtin): Declare. gcc/fortran/ChangeLog: * cpp.cc (gfc_cpp_init): Use special_fname_builtin () rather than a hardcoded string (which was also incorrectly left untranslated previously.) * error.cc (gfc_diagnostic_build_locus_prefix): Likewise. * f95-lang.cc (gfc_init): Likewise.
Showing
- gcc/c-family/c-opts.cc 1 addition, 1 deletiongcc/c-family/c-opts.cc
- gcc/diagnostic.cc 1 addition, 1 deletiongcc/diagnostic.cc
- gcc/fortran/cpp.cc 1 addition, 1 deletiongcc/fortran/cpp.cc
- gcc/fortran/error.cc 2 additions, 2 deletionsgcc/fortran/error.cc
- gcc/fortran/f95-lang.cc 1 addition, 1 deletiongcc/fortran/f95-lang.cc
- gcc/input.cc 8 additions, 2 deletionsgcc/input.cc
- gcc/input.h 3 additions, 0 deletionsgcc/input.h
Loading
Please register or sign in to comment