public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: naoki ueda <tantan19tanuki@gmail.com>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: About ' * ' not recognized
Date: Fri, 20 Jan 2023 17:12:39 -0800	[thread overview]
Message-ID: <CA+=Sn1m=E81QdW-zuY-LJ0omjM5K-54b85UwrqaE5Gw6q=_ckg@mail.gmail.com> (raw)
In-Reply-To: <9048dc4f8781fe08a28bed39647f2ca4eeb25fa2.camel@gmail.com>

On Fri, Jan 20, 2023 at 5:05 PM naoki ueda via Gcc-bugs
<gcc-bugs@gcc.gnu.org> wrote:
>
> When I tried to execute the attached file mycalc.c with a command line
> argument, it could not be executed normally only in the case of '*'.
> '+', '-' and '/' can be executed normally, but the compiler cannot
> execute '*' normally. Isn't this a gcc bug?

First off this email list is really for automated messages from gcc's
bugzilla rather than from users reporting issues.

>
>
> ~/Clearning$ ./mycalc 20 * 30

Oh * here is being handled by the shell you are using and being
expanded as all the files in the current working directory. This has
nothing to do with GCC really.
You can use quotes around the * to force the shell not expanding it
such as this:
./mycalc 20 '*' 30

or you use \ to force the shell not to expand what comes after the * like this:
./mycalc 20 \* 30

Thanks,
Andrew Pinski

> 用法:mycalc 数値1 演算子 数値2

  reply	other threads:[~2023-01-21  1:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  1:04 naoki ueda
2023-01-21  1:12 ` Andrew Pinski [this message]
2023-01-21  1:18   ` naoki ueda

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='CA+=Sn1m=E81QdW-zuY-LJ0omjM5K-54b85UwrqaE5Gw6q=_ckg@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=tantan19tanuki@gmail.com \
    /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: link
Be 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).