public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "frederic.recoules@univ-grenoble-alpes.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug inline-asm/93903] invalid input constraint in __asm__
Date: Sun, 15 Mar 2020 19:30:12 +0000	[thread overview]
Message-ID: <bug-93903-4-4501EuN8Lk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93903-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93903

Frédéric Recoules <frederic.recoules@univ-grenoble-alpes.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |frederic.recoules@univ-gren
                   |                            |oble-alpes.fr

--- Comment #2 from Frédéric Recoules <frederic.recoules@univ-grenoble-alpes.fr> ---
(In reply to Frédéric Recoules from comment #1)
> I am pretty sure the error comes from the space you left in "r ".
> Yet, in the "Simple-Constraints" documentation, it is said that space are
> ignored
> to allow visual alignment but, in fact, I realized a while ago it generates
> an error.
> 
> I think it would not be a big change to either update the documentation at
> https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-
> Constraints or to make the parser ignore the blank.

I read me again and see how my comment was useless but, I really wanted to
help.
In fact I found that space are authorized for output but not for input.

In the file stmt.c: 

In the function parse_input_constraint, the default case starts with:

if (!ISALPHA (*p))
            break;

So it just exits the switch and continue, while the default case of
parse_input_constraint starts with: 

if (! ISALPHA (constraint[j]))
          {
            error ("invalid punctuation %qc in constraint", constraint[j]);
            return false;
          }

Yet, I would add in the switch for both:

case ' ':
  break;

       reply	other threads:[~2020-03-15 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93903-4@http.gcc.gnu.org/bugzilla/>
2020-03-15 19:30 ` frederic.recoules@univ-grenoble-alpes.fr [this message]
2021-09-14 21:00 ` [Bug middle-end/93903] space in constraint for inline-asm not ignored after all pinskia 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-93903-4-4501EuN8Lk@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: 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).