Jump to page: 1 2
Thread overview
[Issue 22070] importC: Error: string/array literal is not an lvalue
[Issue 22070] importC: Error: string literal is not an lvalue
Jun 22, 2021
Iain Buclaw
Jul 17, 2021
Walter Bright
Jul 18, 2021
Dlang Bot
Jul 19, 2021
Dlang Bot
Jul 22, 2021
Dlang Bot
Apr 26, 2022
Steven Dwy
Apr 26, 2022
Steven Dwy
Apr 26, 2022
Dlang Bot
Apr 27, 2022
Dlang Bot
May 01, 2022
Dlang Bot
May 02, 2022
Dlang Bot
May 09, 2022
Dlang Bot
Sep 15, 2022
Walter Bright
Sep 20, 2022
Walter Bright
June 22, 2021
https://issues.dlang.org/show_bug.cgi?id=22070

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC, rejects-valid
                 CC|                            |ibuclaw@gdcproject.org

--
July 17, 2021
https://issues.dlang.org/show_bug.cgi?id=22070

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
Interestingly, dmc rejects it, too, with cannot take the address of a string.

--
July 18, 2021
https://issues.dlang.org/show_bug.cgi?id=22070

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #12888 "Issue 22070 - importC: Error: string literal is not an lvalue" mentioning this issue:

- Issue 22070 - importC: Error: string literal is not an lvalue

https://github.com/dlang/dmd/pull/12888

--
July 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22070

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #12889 "fix Issue 22070 - importC: Error: string literal is not an lvalue" fixing this issue:

- fix Issue 22070 - importC: Error: string literal is not an lvalue

https://github.com/dlang/dmd/pull/12889

--
July 22, 2021
https://issues.dlang.org/show_bug.cgi?id=22070

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12889 "fix Issue 22070 - importC: Error: string literal is not an lvalue" was merged into master:

- 9a377cbe666a669eee67ebc9d26796249cf4e488 by Walter Bright:
  fix Issue 22070 - importC: Error: string literal is not an lvalue

https://github.com/dlang/dmd/pull/12889

--
April 26, 2022
https://issues.dlang.org/show_bug.cgi?id=22070

Steven Dwy <me@yoplitein.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |me@yoplitein.net
         Resolution|FIXED                       |---

--- Comment #5 from Steven Dwy <me@yoplitein.net> ---
This also applies to array literals, per 6.5.2.5-4:
> In either case [array or object], the result is an lvalue.
```
short(*v1)[2] = &(short[]){1, 2};
```

Object literals act as lvalues as expected.

Additionally, the following invalid code is now accepted:
```
char(**s1)[3] = &(&"aa");
char(***s2)[3] = &(&(&"aa"));
// and so on
```

--
April 26, 2022
https://issues.dlang.org/show_bug.cgi?id=22070

Steven Dwy <me@yoplitein.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|importC: Error: string      |importC: Error:
                   |literal is not an lvalue    |string/array literal is not
                   |                            |an lvalue

--
April 26, 2022
https://issues.dlang.org/show_bug.cgi?id=22070

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Yoplitein created dlang/dmd pull request #14028 "Expand fix for issue 22070 to also allow array literals as lvalues" mentioning this issue:

- Expand fix for issue 22070 to also allow array literals as lvalues

  Check for and restrict nested address-of expressions on literals, such as
`&(&"")`

https://github.com/dlang/dmd/pull/14028

--
April 27, 2022
https://issues.dlang.org/show_bug.cgi?id=22070

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #14028 "Expand fix for issue 22070 to also allow array literals as lvalues" was merged into master:

- 95f218d081b0695836f901b62f0b16bb68107449 by Steven Dwy:
  Expand fix for issue 22070 to also allow array literals as lvalues

  Check for and restrict nested address-of expressions on literals, such as
`&(&"")`

https://github.com/dlang/dmd/pull/14028

--
May 01, 2022
https://issues.dlang.org/show_bug.cgi?id=22070

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright updated dlang/dmd pull request #14049 "fix Issue 23057 - importC: dmd segfault on invalid syntax" mentioning this issue:

- Expand fix for issue 22070 to also allow array literals as lvalues

  Check for and restrict nested address-of expressions on literals, such as
`&(&"")`

https://github.com/dlang/dmd/pull/14049

--
« First   ‹ Prev
1 2