https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794
Bug ID: 104794 Summary: arm: use translation pattern for repetitive messages Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: roland.illig at gmx dot de Target Milestone: --- arm-builtins.cc says: if (fcode == ARM_BUILTIN_WSRLHI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srli_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSRLWI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srli_pi32%> in code"); else if (fcode == ARM_BUILTIN_WSRLDI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srli_si64%> in code"); else if (fcode == ARM_BUILTIN_WSLLHI) error ("the count should be no less than 0; please check the intrinsic %<_mm_slli_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSLLWI) error ("the count should be no less than 0; please check the intrinsic %<_mm_slli_pi32%> in code"); else if (fcode == ARM_BUILTIN_WSLLDI) error ("the count should be no less than 0; please check the intrinsic %<_mm_slli_si64%> in code"); else if (fcode == ARM_BUILTIN_WSRAHI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srai_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSRAWI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srai_pi32%> in code"); else if (fcode == ARM_BUILTIN_WSRADI) error ("the count should be no less than 0; please check the intrinsic %<_mm_srai_si64%> in code"); else if (fcode == ARM_BUILTIN_WSRLH) error ("the count should be no less than 0; please check the intrinsic %<_mm_srl_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSRLW) error ("the count should be no less than 0; please check the intrinsic %<_mm_srl_pi32%> in code"); else if (fcode == ARM_BUILTIN_WSRLD) error ("the count should be no less than 0; please check the intrinsic %<_mm_srl_si64%> in code"); else if (fcode == ARM_BUILTIN_WSLLH) error ("the count should be no less than 0; please check the intrinsic %<_mm_sll_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSLLW) error ("the count should be no less than 0; please check the intrinsic %<_mm_sll_pi32%> in code"); else if (fcode == ARM_BUILTIN_WSLLD) error ("the count should be no less than 0; please check the intrinsic %<_mm_sll_si64%> in code"); else if (fcode == ARM_BUILTIN_WSRAH) error ("the count should be no less than 0; please check the intrinsic %<_mm_sra_pi16%> in code"); else if (fcode == ARM_BUILTIN_WSRAW) error ("the count should be no less than 0; please check the intrinsic %<_mm_sra_pi32%> in code"); else error ("the count should be no less than 0; please check the intrinsic %<_mm_sra_si64%> in code"); As a translator, I have to translate each message individually, which increases the possibility of copy-and-paste mistakes. It would be way easier to me if the code consistently used this pattern: error ("the count should be no less than 0; please check the intrinsic %qs in code", "_mm_sra_si64"); This would eliminate all possible typos and mistakes on my side. A nice side effect is a smaller resulting binary.