Re: [PATCH v2] c: don't emit -Wmissing-variable-declarations for register variables [PR110947]

2023-10-30 Thread Hamza Mahfooz
ping On Fri, Sep 1 2023 at 03:02:41 PM -04:00:00, Hamza Mahfooz wrote: Resolves: PR c/110947 - Should -Wmissing-variable-declarations not trigger on register variables? gcc/c/ChangeLog: PR c/110947 * c-decl.cc (start_decl): don't emit -Wmissing-variable-declara

[PATCH v2 2/2] strlen: call handle_builtin_strlen() from fold_strstr_to_strncmp()

2023-09-04 Thread Hamza Mahfooz
_builtin_strlen(). (strlen_pass::check_and_optimize_call): Add m_gsi to the handle_builtin_strlen() call. gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-30.c: Add a test. Signed-off-by: Hamza Mahfooz --- v2: bump up the number of strncmp()s from 6 to 7 in strlenopt-30.c ---

[PATCH v2 1/2] strlen: fold strstr() even if the length isn't previously known [PR96601]

2023-09-04 Thread Hamza Mahfooz
tree-optimization/96601 gcc/ChangeLog: * tree-ssa-strlen.cc (fold_strstr_to_strncmp): If arg1_len == NULL, insert a strlen() for strstr()'s arg1 and use it as arg1_len. gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-30.c: Modify test. Signed-off-by: Hamza Mahfooz --- Please

[PATCH 2/2] strlen: call handle_builtin_strlen() from fold_strstr_to_strncmp()

2023-09-04 Thread Hamza Mahfooz
_builtin_strlen(). (strlen_pass::check_and_optimize_call): Add m_gsi to the handle_builtin_strlen() call. gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-30.c: Add a test. Signed-off-by: Hamza Mahfooz --- Please push this for me if you think it looks good. Since, I don't have

[PATCH 1/2] strlen: fold strstr() even if the length isn't previously known [PR96601]

2023-09-04 Thread Hamza Mahfooz
tree-optimization/96601 gcc/ChangeLog: * tree-ssa-strlen.cc (fold_strstr_to_strncmp): If arg1_len == NULL, insert a strlen() for strstr()'s arg1 and use it as arg1_len. gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-30.c: Modify test. Signed-off-by: Hamza Mahfooz --- Please

[PATCH v2] c: don't emit -Wmissing-variable-declarations for register variables [PR110947]

2023-09-01 Thread Hamza Mahfooz
10947 * gcc.dg/pr110947.c: New test. Signed-off-by: Hamza Mahfooz --- Please push this for me if you think it looks good. Since, I don't have write access to the repository. v2: put "target" before the relevant architectures in pr110947.c. --- gcc/c/c-decl.cc

[PATCH] c: don't emit -Wmissing-variable-declarations for register variables [PR110947]

2023-09-01 Thread Hamza Mahfooz
10947 * gcc.dg/pr110947.c: New test. Signed-off-by: Hamza Mahfooz --- Please push this for me if you think it looks good. Since, I don't have write access to the repository. --- gcc/c/c-decl.cc | 3 ++- gcc/testsuite/gcc.dg/pr110947.c | 4 2 files changed, 6

Re: [PATCH RESEND] c: add -Wmissing-variable-declarations [PR65213]

2023-07-31 Thread Hamza Mahfooz
Hey Joseph, On Fri, Jul 28 2023 at 08:32:31 PM +00:00:00, Joseph Myers wrote: OK. -- Joseph S. Myers jos...@codesourcery.com Since I don't have write access, do you mind pushing this for me?

[PATCH RESEND] c: add -Wmissing-variable-declarations [PR65213]

2023-07-18 Thread Hamza Mahfooz
-Wmissing-variable-declarations. gcc/ChangeLog: PR c/65213 * doc/invoke.texi (-Wmissing-variable-declarations): Document new option. gcc/testsuite/ChangeLog: PR c/65213 * gcc.dg/Wmissing-variable-declarations.c: New test. Signed-off-by: Hamza

Re: [PATCH] Add -Wmissing-variable-declarations [PR65213].

2023-07-05 Thread Hamza Mahfooz
Ping? On Tue, Jun 13 2023 at 09:05:29 AM -04:00:00, Hamza Mahfooz wrote: Resolves: PR c/65213 - Extend -Wmissing-declarations to variables [i.e. add -Wmissing-variable-declarations] gcc/c-family/ChangeLog: PR c/65213 * c.opt (-Wmissing-variable-declarations): New option

[PATCH] Add -Wmissing-variable-declarations [PR65213].

2023-06-13 Thread Hamza Mahfooz
-Wmissing-variable-declarations gcc/ChangeLog: PR c/65213 * doc/invoke.texi (-Wmissing-variable-declarations): Document new option. gcc/testsuite/ChangeLog: PR c/65213 * gcc.dg/Wmissing-variable-declarations.c: New test. Signed-off-by: Hamza Mahfooz