Thread overview
[Issue 23716] compilable/testcstuff2.c:18:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asm’
Feb 15, 2023
Iain Buclaw
Feb 15, 2023
Iain Buclaw
Feb 15, 2023
Iain Buclaw
Feb 15, 2023
Dlang Bot
Feb 15, 2023
Iain Buclaw
[Issue 23716] ImportC: Missing documentation on the asm keyword accepted as an extension
Feb 15, 2023
Iain Buclaw
Feb 20, 2023
Dlang Bot
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, ImportC
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=23689
         Depends on|                            |23689


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=23689
[Issue 23689] ImportC: C tests in the testsuite are not valid C
--
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Also:

void test21934()
{
    typedef int asmreg;
    register asmreg r1 asm("r1");
    // asm ignored by C compiler, should be disallowed?
    asmreg r2 asm("r2");

    register asmreg r3 asm("r3") = 3;
    // asm ignored by C compiler, should be disallowed?
    asmreg r4 asm("r4") = 4;
}

--
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
More errors:

runnable/test23011.c:7:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘asm’
    7 | extern char **myenviron asm("environ");
      |                         ^~~

runnable/test23011.c:8:27: error: expected declaration specifiers before ‘asm’
    8 | int myprintf(char *, ...) asm("printf");
      |                           ^~~


runnable/test23347.c:12:14: error: expected declaration specifiers before ‘asm’
   12 | void spoon() asm("fork");
      |              ^~~

--
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ibuclaw created dlang/dlang.org pull request #3530 "fix Issue 23716 - Document asm extension for ImportC" fixing this issue:

- fix Issue 23716 - Document asm extension for ImportC

https://github.com/dlang/dlang.org/pull/3530

--
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|dmd                         |dlang.org

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
`asm` is a GNU extension, and errors go away if instead compiling with `-std=gnu11`.  However that this is an extension is not documented on the dlang.org spec pages.

--
February 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|compilable/testcstuff2.c:18 |ImportC: Missing
                   |:20: error: expected ‘=’,   |documentation on the asm
                   |‘,’, ‘;’, ‘asm’ or          |keyword accepted as an
                   |‘__attribute__’ before      |extension
                   |‘asm’                       |

--
February 20, 2023
https://issues.dlang.org/show_bug.cgi?id=23716

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dlang.org pull request #3530 "fix Issue 23716 - Document asm extension for ImportC" was merged into master:

- 55d75043cd77401048f6d3a9a24db317bf9dde02 by Iain Buclaw:
  fix Issue 23716 - Document asm extension for ImportC

https://github.com/dlang/dlang.org/pull/3530

--
December 15, 2023
https://issues.dlang.org/show_bug.cgi?id=23716
Issue 23716 depends on issue 23689, which changed state.

Issue 23689 Summary: ImportC: C tests in the testsuite are not valid C https://issues.dlang.org/show_bug.cgi?id=23689

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--