public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108375] [10/11/12/13 Regression] Some variably modified types not detected as such Date: Sat, 18 Feb 2023 09:39:50 +0000 [thread overview] Message-ID: <bug-108375-4-iFCODiaKsT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108375-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108375 --- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uecker@gcc.gnu.org>: https://gcc.gnu.org/g:47821ba07a19b672d3cba351a03af2b122e02213 commit r13-6128-g47821ba07a19b672d3cba351a03af2b122e02213 Author: Martin Uecker <uecker@tugraz.at> Date: Wed Feb 15 10:54:00 2023 +0100 C: Detect all variably modified types [PR108375] Some variably modified types were not detected correctly. Define C_TYPE_VARIABLY_MODIFIED via TYPE_LANG_FLAG 6 in the CFE. This flag records whether a type is variably modified and is set for all such types including arrays with variably modified element type or structures and unions with variably modified members. This is then used to detect such types in the C FE and middle-end (via the existing language hook). gcc/c/ChangeLog: PR c/108375 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p. (diagnose_mismatched_decl): Dito. (warn_about_goto): Dito: (c_check_switch_jump_warnings): Dito. (finish_decl): Dito. (finish_struct): Dito. (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED. (finish_struct): Set C_TYPE_VARIABLY_MODIFIED. * c-objc-common.cc (c_var_mod_p): New function. (c_var_unspec_p): Remove. * c-objc-common.h: Set lang hook. * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p. (c_parser_typeof_specifier): Dito. (c_parser_has_attribute_expression): Dito. (c_parser_generic_selection): Dito. * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p. * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED. gcc/testsuite/ChangeLog: PR c/108375 * gcc.dg/pr108375-1.c: New test. * gcc.dg/pr108375-2.c: New test.
next prev parent reply other threads:[~2023-02-18 9:39 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-11 18:44 [Bug c/108375] New: " jsm28 at gcc dot gnu.org 2023-01-11 19:36 ` [Bug c/108375] " pinskia at gcc dot gnu.org 2023-01-11 19:38 ` pinskia at gcc dot gnu.org 2023-01-11 19:40 ` pinskia at gcc dot gnu.org 2023-01-13 11:31 ` ebotcazou at gcc dot gnu.org 2023-02-13 13:57 ` muecker at gwdg dot de 2023-02-14 8:34 ` muecker at gwdg dot de 2023-02-15 23:04 ` muecker at gwdg dot de 2023-02-17 20:31 ` muecker at gwdg dot de 2023-02-18 9:39 ` cvs-commit at gcc dot gnu.org [this message] 2023-02-21 13:13 ` [Bug c/108375] [10/11/12 " rguenth at gcc dot gnu.org 2023-02-21 13:36 ` muecker at gwdg dot de 2023-07-07 10:44 ` [Bug c/108375] [11/12 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108375-4-iFCODiaKsT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).