On Tue, Nov 26, 2024 at 06:19:46PM +0100, Heiko Eißfeldt wrote: > Thanks for your patience! > > On 11/26/24 8:36 AM, Jakub Jelinek wrote: > > This is wrongly formatted and valid only in C++17 and later, while > > GCC is currently written in C++14. > > So it needs to be > > static_assert (FIRST_PSEUDO_REGISTER <= INT_MAX, ""); > done.
There are three important parts missing. I don't see you in MAINTAINERS file, so you need to decide if you assign copyright to FSF or submit this under DCO. See https://gcc.gnu.org/contribute.html#legal for more details (if you already have FSF assignment on file, somebody would need to check that, I don't have access to that). Another part is that a ChangeLog entry is missing (as documented in https://gcc.gnu.org/codingconventions.html#ChangeLogs). For your patch, that would be something like: PR middle-end/114540 * varasm.cc (decode_reg_name_and_count): Use strtoul instead of atoi and simplify verification the whole asmspec contains just decimal digits. (if testcase is added, empty line and * testcase_filename_relative_to_gcc/testsuite/: New test. added too; and if you go with DCO, followed by empty line and Signed-Off-By: line). The third part is missing testcase, for PR like this it should be probably in gcc/testsuite/gcc.dg/pr114540.c, have /* PR middle-end/114540 */ /* { dg-do compile } */ and add /* { dg-error "whatever error to expect" } */ directives to the lines on which errors will appear after the patch. Jakub