From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id BA6413858C60 for ; Mon, 18 Sep 2023 07:40:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA6413858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-502e7d66c1eso6394029e87.1 for ; Mon, 18 Sep 2023 00:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695022831; x=1695627631; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DWFGbh+yFC/bSjFkZmhZr8zRgqDlCeZOMmuWk0VRywU=; b=X8TBrvWKcYJcHMLTElUl6hz8X8Niawmvn0IfLaJXCjRVHkvRqRl9ZYEl44IdX2R6Ou F0QmolLEloVIVyVWrZpXklNCWlFx/nHBf6SgkmbhfiEHtfjUmIWVFho00TfWN9JysitS OeURQCoTlif5L/D0DuGEWl6PJywpXx7Y4moamNxkJJ3JopxqkYV0qs4mvGBOtHZmFTVO 2avdoErIOdYCn6FN4o+orRdyvHrKbyp/D2aHrjObaWyD5UMf38LOxkrTpa0AwUwlTJcJ yI3FAy0O7PQVtdaimY+K6ayayi2vdA3QxtEUzS6WCIztCNDdHChWU+MHX/EqfRw6C/AZ 3rtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695022831; x=1695627631; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DWFGbh+yFC/bSjFkZmhZr8zRgqDlCeZOMmuWk0VRywU=; b=YqSwDxVfk4W0QntNeS0fO8Z4zC5nmp5sQ2XPPJ0/100/ojjkGwJDS64cQVMhBRH6/5 wrEyNTWZjeann1jkyBnUKh5z0aVGEaiGBzZ2YcGhj1CiFhAk56GnMkKcsgSRCDtCJIrw oBQSkP7z8/078epN6zFfg0xm6JCdpzLeGEeJu3BBFKbGw9TZq/+500EYp7MHKXy2nP5V Da/yBvVnfcvK6lfg27QNKrEnLjohaUabdtCBryn602WBhLnYdHLiZfy+aSOCV2hpfMIv dop7l7sBh9zHafLJvqvvJjKFp9KEdvRmD9qr8HcgaJDeywoS29vKdQ95Y3fu5Y+rxALp FUaw== X-Gm-Message-State: AOJu0Yx5L5OP2xfMVJgm2Koys/8F4iWONJlkffhNZkaEJgYeqVTBVpmO WZf5K+vNYYbV67v3mWmJgHulqr1Elpdr7mUhS/gx/xIX X-Google-Smtp-Source: AGHT+IF7cOR1xU+3TGCzPLOxqIDksuW6GW4jitEr3NanrIGukHcJFN37sloXgTlWD/K/ASAmLSXAHraLmd/ClHr4BTE= X-Received: by 2002:a05:6512:2015:b0:4fb:744e:17db with SMTP id a21-20020a056512201500b004fb744e17dbmr6046814lfb.1.1695022830920; Mon, 18 Sep 2023 00:40:30 -0700 (PDT) MIME-Version: 1.0 References: <20230917194617.928955-1-dkm@kataplop.net> In-Reply-To: <20230917194617.928955-1-dkm@kataplop.net> From: Richard Biener Date: Mon, 18 Sep 2023 09:40:18 +0200 Message-ID: Subject: Re: [PATCH] Trivial typo fix in variadic To: =?UTF-8?Q?Marc_Poulhi=C3=A8s?= Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, Sep 17, 2023 at 9:47=E2=80=AFPM Marc Poulhi=C3=A8s via Gcc-patches wrote: > > Fix all occurences of varadic, except for Rust (will be part of another c= hange). OK. > gcc/ChangeLog: > > * config/nvptx/nvptx.h (struct machine_function): Fix typo in var= iadic. > * config/nvptx/nvptx.cc (nvptx_function_arg_advance): Adjust to u= se fixed name. > (nvptx_declare_function_name): Likewise. > (nvptx_call_args): Likewise. > (nvptx_expand_call): Likewise. > > gcc/cp/ChangeLog: > > * lambda.cc (compare_lambda_sig): Fix typo in variadic. > > libcpp/ChangeLog: > > * macro.cc (parse_params): Fix typo in variadic. > (create_iso_definition): Likewise. > > Signed-off-by: Marc Poulhi=C3=A8s > --- > > Hi, > > I came across this trivial typo and fixed it. > > The compiler still builds correctly. > I've bootstraped x86_64-linux. > As I don't really know how to setup nvptx correctly (and not sure > this trivial fix warrants learning the full setup...), I've simply > built the compiler for nvptx-none. > > Ok for master? > > gcc/config/nvptx/nvptx.cc | 14 +++++++------- > gcc/config/nvptx/nvptx.h | 4 ++-- > gcc/cp/lambda.cc | 2 +- > libcpp/macro.cc | 20 ++++++++++---------- > 4 files changed, 20 insertions(+), 20 deletions(-) > > diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc > index edef39fb5e1..0de42408841 100644 > --- a/gcc/config/nvptx/nvptx.cc > +++ b/gcc/config/nvptx/nvptx.cc > @@ -720,7 +720,7 @@ nvptx_function_arg_advance (cumulative_args_t cum_v, = const function_arg_info &) > > /* Implement TARGET_FUNCTION_ARG_BOUNDARY. > > - For nvptx This is only used for varadic args. The type has already > + For nvptx This is only used for variadic args. The type has already > been promoted and/or converted to invisible reference. */ > > static unsigned > @@ -1548,7 +1548,7 @@ nvptx_declare_function_name (FILE *file, const char= *name, const_tree decl) > if (!TARGET_SOFT_STACK) > { > /* Declare a local var for outgoing varargs. */ > - if (cfun->machine->has_varadic) > + if (cfun->machine->has_variadic) > init_frame (file, STACK_POINTER_REGNUM, > UNITS_PER_WORD, crtl->outgoing_args_size); > > @@ -1558,7 +1558,7 @@ nvptx_declare_function_name (FILE *file, const char= *name, const_tree decl) > init_frame (file, FRAME_POINTER_REGNUM, alignment, > ROUND_UP (sz, GET_MODE_SIZE (DImode))); > } > - else if (need_frameptr || cfun->machine->has_varadic || cfun->calls_al= loca > + else if (need_frameptr || cfun->machine->has_variadic || cfun->calls_a= lloca > || (cfun->machine->has_simtreg && !crtl->is_leaf)) > init_softstack_frame (file, alignment, sz); > > @@ -1795,13 +1795,13 @@ nvptx_call_args (rtx arg, tree fntype) > if (!cfun->machine->doing_call) > { > cfun->machine->doing_call =3D true; > - cfun->machine->is_varadic =3D false; > + cfun->machine->is_variadic =3D false; > cfun->machine->num_args =3D 0; > > if (fntype && stdarg_p (fntype)) > { > - cfun->machine->is_varadic =3D true; > - cfun->machine->has_varadic =3D true; > + cfun->machine->is_variadic =3D true; > + cfun->machine->has_variadic =3D true; > cfun->machine->num_args++; > } > } > @@ -1871,7 +1871,7 @@ nvptx_expand_call (rtx retval, rtx address) > } > > unsigned nargs =3D cfun->machine->num_args; > - if (cfun->machine->is_varadic) > + if (cfun->machine->is_variadic) > { > varargs =3D gen_reg_rtx (Pmode); > emit_move_insn (varargs, stack_pointer_rtx); > diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h > index 129427e5654..666021283c2 100644 > --- a/gcc/config/nvptx/nvptx.h > +++ b/gcc/config/nvptx/nvptx.h > @@ -209,8 +209,8 @@ struct GTY(()) machine_function > { > rtx_expr_list *call_args; /* Arg list for the current call. */ > bool doing_call; /* Within a CALL_ARGS ... CALL_ARGS_END sequence. */ > - bool is_varadic; /* This call is varadic */ > - bool has_varadic; /* Current function has a varadic call. */ > + bool is_variadic; /* This call is variadic */ > + bool has_variadic; /* Current function has a variadic call. */ > bool has_chain; /* Current function has outgoing static chain. */ > bool has_softstack; /* Current function has a soft stack frame. */ > bool has_simtreg; /* Current function has an OpenMP SIMD region. */ > diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc > index a359bc6ee8d..34d0190a89b 100644 > --- a/gcc/cp/lambda.cc > +++ b/gcc/cp/lambda.cc > @@ -1619,7 +1619,7 @@ compare_lambda_sig (tree fn_a, tree fn_b) > { > if (!args_a || !args_b) > return false; > - // This check also deals with differing varadicness > + // This check also deals with differing variadicness > if (!same_type_p (TREE_VALUE (args_a), TREE_VALUE (args_b))) > return false; > } > diff --git a/libcpp/macro.cc b/libcpp/macro.cc > index dada8fea835..4f229c1501c 100644 > --- a/libcpp/macro.cc > +++ b/libcpp/macro.cc > @@ -3431,7 +3431,7 @@ _cpp_unsave_parameters (cpp_reader *pfile, unsigned= n) > */ > > static bool > -parse_params (cpp_reader *pfile, unsigned *n_ptr, bool *varadic_ptr) > +parse_params (cpp_reader *pfile, unsigned *n_ptr, bool *variadic_ptr) > { > unsigned nparms =3D 0; > bool ok =3D false; > @@ -3462,7 +3462,7 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr, b= ool *varadic_ptr) > }; > unsigned ix =3D prev_ident; > const unsigned char *as_text =3D NULL; > - if (*varadic_ptr) > + if (*variadic_ptr) > ix =3D 4; > else if (token->type =3D=3D CPP_EOF) > ix +=3D 2; > @@ -3473,7 +3473,7 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr, b= ool *varadic_ptr) > goto out; > > case CPP_NAME: > - if (prev_ident || *varadic_ptr) > + if (prev_ident || *variadic_ptr) > goto bad; > prev_ident =3D true; > > @@ -3484,7 +3484,7 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr, b= ool *varadic_ptr) > break; > > case CPP_CLOSE_PAREN: > - if (prev_ident || !nparms || *varadic_ptr) > + if (prev_ident || !nparms || *variadic_ptr) > { > ok =3D true; > goto out; > @@ -3492,15 +3492,15 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr,= bool *varadic_ptr) > > /* FALLTHRU */ > case CPP_COMMA: > - if (!prev_ident || *varadic_ptr) > + if (!prev_ident || *variadic_ptr) > goto bad; > prev_ident =3D false; > break; > > case CPP_ELLIPSIS: > - if (*varadic_ptr) > + if (*variadic_ptr) > goto bad; > - *varadic_ptr =3D true; > + *variadic_ptr =3D true; > if (!prev_ident) > { > /* An ISO bare ellipsis. */ > @@ -3577,7 +3577,7 @@ create_iso_definition (cpp_reader *pfile) > unsigned int num_extra_tokens =3D 0; > unsigned nparms =3D 0; > cpp_hashnode **params =3D NULL; > - bool varadic =3D false; > + bool variadic =3D false; > bool ok =3D false; > cpp_macro *macro =3D NULL; > > @@ -3594,7 +3594,7 @@ create_iso_definition (cpp_reader *pfile) > else if (token->type =3D=3D CPP_OPEN_PAREN) > { > /* An open-paren, get a parameter list. */ > - if (!parse_params (pfile, &nparms, &varadic)) > + if (!parse_params (pfile, &nparms, &variadic)) > goto out; > > params =3D (cpp_hashnode **)_cpp_commit_buff > @@ -3645,7 +3645,7 @@ create_iso_definition (cpp_reader *pfile) > > if (!token) > { > - macro->variadic =3D varadic; > + macro->variadic =3D variadic; > macro->paramc =3D nparms; > macro->parm.params =3D params; > macro->fun_like =3D true; > -- > 2.40.1 >