On 7/9/24 6:41 AM, Nina Dinka Ranns wrote:
On Mon, 8 Jul 2024 at 16:01, Jason Merrill <ja...@redhat.com <mailto:ja...@redhat.com>> wrote:

    On 7/8/24 7:47 AM, Nina Dinka Ranns wrote:
     > HI Jason,
     >
     > On Fri, 5 Jul 2024 at 17:31, Jason Merrill <ja...@redhat.com
    <mailto:ja...@redhat.com>> wrote:
     >>
     >> On 7/5/24 10:25 AM, Nina Dinka Ranns wrote:
     >>> Certain places in contract parsing currently do not check for
    errors.
     >>> This results in contracts
     >>> with embedded errors which eventually confuse gimplify. Checks for
     >>> errors added in
     >>> grok_contract() and cp_parser_contract_attribute_spec() to exit
    early
     >>> if an error is encountered.
     >>
     >> Thanks for the patch!
     >>
     >>> Tested on x86_64-pc-linux-gnu
     >>> ---
     >>>
     >>>           PR c++/113968
     >>>
     >>> gcc/cp/ChangeLog:
     >>>
     >>>           * contracts.cc (grok_contract): Check for
    error_mark_node early
     >>>             exit
     >>
     >> These hunks are OK.
     >>
     >>>           * parser.cc (cp_parser_contract_attribute_spec):
    Check for
     >>>             error_mark_node early exit
     >>
     >> This seems redundant, since finish_contract_attribute already
    checks for
     >> error_mark_node and we're returning its result unchanged.
     >
     > good catch, removed.
     >
     >>
     >> Also, the convention is for wrapped lines in ChangeLog entries
    to line
     >> up with the *, and to finish sentences with a period.
     >
     > done.
     >
     > Tests re-run on x86_64-pc-linux-gnu , no change.

    This looks good, but the patch doesn't apply due to word wrap.  To
    avoid
    that, I tend to use git send-email; sending the patch as an attachment
    is also OK.  Or see

    https://www.kernel.org/doc/html/latest/process/email-clients.html
    <https://www.kernel.org/doc/html/latest/process/email-clients.html>

    for tips on getting various email clients to leave patches alone.


ack, thank you for your patience.
This time, patch attached to the email.

It looks like the attached patch reverted to older ChangeLog entries, without the periods, and with the dropped parser.cc change?

git gcc-verify also complains

ERR: line should start with a tab: "        * contracts.cc (grok_contract): Check 
for error_mark_node early"
ERR: line should start with a tab: "          exit"
ERR: line should start with a tab: "        * parser.cc 
(cp_parser_contract_attribute_spec): Check for"
ERR: line should start with a tab: "          error_mark_node early exit"
ERR: line should start with a tab: "        * g++.dg/contracts/pr113968.C: New 
test."
ERR: PR 113968 in subject but not in changelog: "c++, contracts: Fix ICE in 
create_tmp_var [PR113968]"

Jason

Reply via email to