Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-12-05 Thread Segher Boessenkool
Hi! On Wed, Dec 05, 2018 at 04:47:37PM -0500, Jason Merrill wrote: > On 12/2/18 11:38 AM, Segher Boessenkool wrote: > >PR55681 observes that currently only one qualifier is allowed for > >inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also > >okay (with a warning), but "const v

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-12-05 Thread Jason Merrill
On 12/2/18 11:38 AM, Segher Boessenkool wrote: PR55681 observes that currently only one qualifier is allowed for inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also okay (with a warning), but "const volatile asm" gives an error. Also "goto" has to be last. This patch changes

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-12-03 Thread Joseph Myers
On Sun, 2 Dec 2018, Segher Boessenkool wrote: > PR55681 observes that currently only one qualifier is allowed for > inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also > okay (with a warning), but "const volatile asm" gives an error. Also > "goto" has to be last. > > This pat

[PATCH 1/2] asm qualifiers (PR55681)

2018-12-02 Thread Segher Boessenkool
PR55681 observes that currently only one qualifier is allowed for inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also okay (with a warning), but "const volatile asm" gives an error. Also "goto" has to be last. This patch changes things so that only "asm-qualifiers" are allowed

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Segher Boessenkool
On Fri, Nov 30, 2018 at 12:11:30AM +, Joseph Myers wrote: > On Thu, 29 Nov 2018, Segher Boessenkool wrote: > > > So "asm const restrict" is allowed, but "asm const const restrict" isn't. > > No, asm const restrict isn't allowed. volatile is allowed; const and > restrict are allowed with war

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Joseph Myers
On Thu, 29 Nov 2018, Segher Boessenkool wrote: > So "asm const restrict" is allowed, but "asm const const restrict" isn't. No, asm const restrict isn't allowed. volatile is allowed; const and restrict are allowed with warnings because that replicates what the old bison parser allowed; but at m

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Segher Boessenkool
On Thu, Nov 29, 2018 at 11:14:45PM +, Joseph Myers wrote: > On Thu, 29 Nov 2018, Segher Boessenkool wrote: > > > > What's the basis for allowing duplicates for C but not for C++? > > > > It is the status quo. It would make sense to allow duplicates for C++ as > > well, sure. If that is pref

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Joseph Myers
On Thu, 29 Nov 2018, Segher Boessenkool wrote: > > What's the basis for allowing duplicates for C but not for C++? > > It is the status quo. It would make sense to allow duplicates for C++ as > well, sure. If that is preferred I can make a patch for it? Duplicate qualifiers are allowed *in dec

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Segher Boessenkool
On Thu, Nov 29, 2018 at 09:13:13PM +, Joseph Myers wrote: > I'd expect testcases to be added for the new syntax variants (duplicate > qualifiers / goto and new orderings thereof). Okay. > There's a description of the syntax in extend.texi: > > @example > asm @r{[}volatile@r{]} ( @var{Assemb

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Joseph Myers
I'd expect testcases to be added for the new syntax variants (duplicate qualifiers / goto and new orderings thereof). There's a description of the syntax in extend.texi: @example asm @r{[}volatile@r{]} ( @var{AssemblerTemplate} : @var{OutputOperands} @r{[} : @

Re: [PATCH 1/2] asm qualifiers (PR55681)

2018-11-29 Thread Segher Boessenkool
+cc: C and C++ maintainers. Sorry I forgot before :-/ On Tue, Oct 30, 2018 at 05:30:33PM +, Segher Boessenkool wrote: > PR55681 observes that currently only one qualifier is allowed for > inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also > okay (with a warning), but "con

[PATCH 1/2] asm qualifiers (PR55681)

2018-10-30 Thread Segher Boessenkool
PR55681 observes that currently only one qualifier is allowed for inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also okay (with a warning), but "const volatile asm" gives an error. Also "const const asm" is an error (while "const const int" is okay for C), "goto" has to be las