aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2022-01-12 02:37:16 +0100
committerHans-Peter Nilsson <hp@axis.com>2022-01-12 03:51:16 +0100
commit31aa664add55542e8e561cd599aa6a2a4e683d73 (patch)
tree51c9ee70212617a03b49572b2cd52ebbe846aa0f /gcc/config.gcc
parentf8feccb8b08a42fa44caff69c8d82860caef3574 (diff)
downloadgcc-31aa664add55542e8e561cd599aa6a2a4e683d73.zip
gcc-31aa664add55542e8e561cd599aa6a2a4e683d73.tar.gz
gcc-31aa664add55542e8e561cd599aa6a2a4e683d73.tar.bz2
cris: Avoid format-string-related warnings in calls to error functions
These tweaks are installed to avoid build-warnings for config/cris/cris.c, like: x/gcc/config/cris/cris.c: In function 'const char* cris_op_str(rtx)': x/gcc/config/cris/cris.c:728:23: warning: unquoted identifier or keyword \ 'cris_op_str' in format [-Wformat-diag] 728 | internal_error ("MULT case in cris_op_str"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./tm.h:20, from x/gcc/backend.h:28, from x/gcc/config/cris/cris.c:26: x/gcc/config/cris/cris.c: In function 'void cris_expand_return(bool)': x/gcc/config/cris/cris.h:42:33: warning: unquoted operator '->' in \ format [-Wformat-diag] 42 | do { if (!(x)) internal_error ("CRIS-port assertion failed: " #x); \ } while (0) x/gcc/config/cris/cris.c:1862:3: note: in expansion of macro 'CRIS_ASSERT' 1862 | CRIS_ASSERT (cfun->machine->return_type != CRIS_RETINSN_RET \ || !on_stack); | ^~~~~~~~~~~ x/gcc/config/cris/cris.c: In function 'void cris_option_override()': x/gcc/config/cris/cris.c:2298:9: warning: space followed by punctuation \ character ':' [-Wformat-diag] 2298 | error ("unknown CRIS version specification in %<-march=%> or " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2299 | "%<-mcpu=%> : %s", cris_cpu_str); | ~~~~~~~~~~~~~~~~~ x/gcc/config/cris/cris.c:2334:9: warning: space followed by punctuation \ character ':' [-Wformat-diag] 2334 | error ("unknown CRIS cpu version specification in %<-mtune=%> : %s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./tm.h:20, from x/gcc/backend.h:28, from x/gcc/config/cris/cris.c:26: x/gcc/config/cris/cris.c: In function 'rtx_def* cris_split_movdx(rtx_def**)': x/gcc/config/cris/cris.h:42:33: warning: unquoted identifier or keyword \ 'GET_CODE' in format [-Wformat-diag] 42 | do { if (!(x)) internal_error ("CRIS-port assertion failed: " #x); \ } while (0) x/gcc/config/cris/cris.c:2457:3: note: in expansion of macro 'CRIS_ASSERT' 2457 | CRIS_ASSERT (GET_CODE (dest) != SUBREG && GET_CODE (src) != SUBREG); | ^~~~~~~~~~~ Not that I therefore agree that operators, identifiers and keywords should have to be dressed up like this for internal error messages; they were more readable without these garments, if only slightly so. 2022-01-11 Hans-Peter Nilsson <hp@axis.com> * config/cris/cris.c: Quote identifiers in parameters to error and internal_error, and remove extraneous spaces with punctuation. * config/cris/cris.h (CRIS_ASSERT): When passing on stringified expression to internal_error, pass it as a parameter instead of appending it to the format part.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions