public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ?
@ 2020-05-12  7:31 dcb314 at hotmail dot com
  2020-05-17 14:59 ` [Bug d/95075] " ibuclaw at gdcproject dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2020-05-12  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95075
           Summary: gcc/d/dmd/dscope.c: 2 * strange assignments ?
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I just tried to build the D compiler with the clang++ compiler.

1.

trunk.git/gcc/d/dmd/dscope.c:318:23: warning: explicitly assigning value of
variable of type 'unsigned int' to itself [-Wself-assign]

Source code is

         fieldInit = fieldInit;

2.

trunk.git/gcc/d/dmd/dscope.c:328:23: warning: explicitly assigning value of
variable of type 'unsigned int' to itself [-Wself-assign]

Duplicate.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/95075] gcc/d/dmd/dscope.c: 2 * strange assignments ?
  2020-05-12  7:31 [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ? dcb314 at hotmail dot com
@ 2020-05-17 14:59 ` ibuclaw at gdcproject dot org
  2020-05-18  9:33 ` ibuclaw at gdcproject dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-05-17 14:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Also present in upstream implementation, I'll ask the author of the change
about it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/95075] gcc/d/dmd/dscope.c: 2 * strange assignments ?
  2020-05-12  7:31 [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ? dcb314 at hotmail dot com
  2020-05-17 14:59 ` [Bug d/95075] " ibuclaw at gdcproject dot org
@ 2020-05-18  9:33 ` ibuclaw at gdcproject dot org
  2020-06-25 15:37 ` cvs-commit at gcc dot gnu.org
  2020-06-25 15:44 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-05-18  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
"""
I think I wrote it that way to emphasize what the result should be, and relied
on the optimizer removing the self-assignment. So, the code is correct.
"""

So I'll remove the self-assignment with a comment expressing this instead.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/95075] gcc/d/dmd/dscope.c: 2 * strange assignments ?
  2020-05-12  7:31 [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ? dcb314 at hotmail dot com
  2020-05-17 14:59 ` [Bug d/95075] " ibuclaw at gdcproject dot org
  2020-05-18  9:33 ` ibuclaw at gdcproject dot org
@ 2020-06-25 15:37 ` cvs-commit at gcc dot gnu.org
  2020-06-25 15:44 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-25 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:1b7b352a8379dbdd74c962d11951982e21e20f13

commit r11-1662-g1b7b352a8379dbdd74c962d11951982e21e20f13
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Wed Jun 24 08:35:58 2020 +0200

    d: Merge upstream dmd 4be011355.

    Fixes self-assignment warnings seen when compiling with clang.

    Reviewed-on: https://github.com/dlang/dmd/pull/11315

    gcc/d/ChangeLog:

            PR d/95075
            * dmd/MERGE: Merge upstream dmd 4be011355.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/95075] gcc/d/dmd/dscope.c: 2 * strange assignments ?
  2020-05-12  7:31 [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ? dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-06-25 15:37 ` cvs-commit at gcc dot gnu.org
@ 2020-06-25 15:44 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-06-25 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

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

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Done.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-25 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  7:31 [Bug d/95075] New: gcc/d/dmd/dscope.c: 2 * strange assignments ? dcb314 at hotmail dot com
2020-05-17 14:59 ` [Bug d/95075] " ibuclaw at gdcproject dot org
2020-05-18  9:33 ` ibuclaw at gdcproject dot org
2020-06-25 15:37 ` cvs-commit at gcc dot gnu.org
2020-06-25 15:44 ` ibuclaw at gdcproject dot org

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).