On Wed, Aug 2, 2023 at 1:20 PM Marek Polacek <pola...@redhat.com> wrote: > > On Wed, Aug 02, 2023 at 12:59:28PM -0400, David Malcolm wrote: > > On Wed, 2023-08-02 at 12:20 -0400, Eric Feng wrote: > > > > Hi Eric, thanks for the updated patch. > > > > Overall, looks good to me, although I'd drop the "Exited." from the > > "sorry" message (and thus from the dg-message directive), since the > > compiler is not exiting, it's just the particular plugin that's giving > > up (but let's not hold up the patch with a "bikeshed" discussion on the > > precise wording). > > > > If Joseph or Marek approves the C parts of the patch, this will be OK > > to push to trunk. > Sounds good. Revised. > > > > index cf82b0306d1..617111b0f0a 100644 > > > --- a/gcc/c/c-parser.cc > > > +++ b/gcc/c/c-parser.cc > > > @@ -1695,6 +1695,32 @@ public: > > > return NULL_TREE; > > > } > > > > > > + tree > > > + lookup_type_by_id (tree id) const final override > > > + { > > > + if (tree type_decl = lookup_name (id)) > > > + { > > > + if (TREE_CODE (type_decl) == TYPE_DECL) > > > + { > > > + tree record_type = TREE_TYPE (type_decl); > > > + if (TREE_CODE (record_type) == RECORD_TYPE) > > > + return record_type; > > > + } > > > + } > > I'd drop this set of { }, like below. OK with that adjusted, thanks. Sounds good — fixed. > > > > + > > > + return NULL_TREE; > > > + } > > > + > > > + tree > > > + lookup_global_var_by_id (tree id) const final override > > > + { > > > + if (tree var_decl = lookup_name (id)) > > > + if (TREE_CODE (var_decl) == VAR_DECL) > > > + return var_decl; > > > + > > > + return NULL_TREE; > > > + } > > > + > > > private: > > > /* Attempt to get an INTEGER_CST from MACRO. > > > Only handle the simplest cases: where MACRO's definition is a > > Marek >
Thank you, everyone. I've submitted a new patch with the described changes. As I do not yet have write access, could someone please help me commit it? Otherwise, please let me know if I should request write access first (the GettingStarted page suggested requesting someone commit the patch for the first few patches before requesting write access). Best, Eric