On Fri, Oct 12, 2018 at 08:13:51AM -0500, Segher Boessenkool wrote: > On Fri, Oct 12, 2018 at 02:38:52PM +0200, Jakub Jelinek wrote: > > On Fri, Oct 12, 2018 at 12:21:06PM +0000, Segher Boessenkool wrote: > > > The Linux kernel people want a feature that makes GCC pretend some > > > inline assembler code is tiny (while it would think it is huge), so > > > that such code will be inlined essentially always instead of > > > essentially never. > > > > Just a minor comment, shouldn't we accept both > > asm volatile inline (...) > > and > > asm inline volatile (...) > > ordering (probably still require that goto if present must be last)? > > For C volatile is a type-qualifier, which makes the syntax more complex > if we would handle it as you suggest. It can be done of course.
You could just check after parsing asm if the next token is inline, handle it then, and after parsing the type qualifiers if there wasn't any inline keyword check for it again. Don't feel strongly about it, but it might be getting hard for users to remember the right ordering (of course, that can be partially helped with useful fixit diagnostics). Jakub