public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "waldemar dot rachwal at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/31960] Premature hiding of symbols makes a copy constructor shooting at its own foot
Date: Wed, 06 Jun 2007 09:44:00 -0000	[thread overview]
Message-ID: <20070606094408.5236.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31960-14556@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from waldemar dot rachwal at gmail dot com  2007-06-06 09:44 -------
[3 weeks went by, but i've not forgotten about my bug report ;]

as about the last comment (#2) I can't fully agree. -Winit-self works, but only
in case of builtin scalar data types. For objects the compiler is almost quiet.

Please don't misunderstand me: I don't really want any options to signal a
warning on self-initializers (more options, much headache). I really expect
well defined, desirable semantics for such constructs because there are cases
they are very helpful. Of course, if the current standard says nothing about
this or leave up to implementors, and we want to have G++ semantics here
defined, there is a room for some options in the meantime until the standard
becomes definite.

Please note that scripting languages are well defined here. Below is a simple
Perl code (strictness checks if vars are defined, while -w option add extra
warning level).

Regards,
WR.

$ perl -Mstrict -e 'my $z = 1; my $z = $z + 1; print "$z\n"'
2
$ perl -w -Mstrict -e 'my $z = 1; my $z = $z + 1; print "$z\n"' 
"my" variable $z masks earlier declaration in same scope at -e line 1.
2


-- 

waldemar dot rachwal at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |waldemar dot rachwal at
                   |                            |gmail dot com
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31960


  parent reply	other threads:[~2007-06-06  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 17:04 [Bug c++/31960] New: " waldemar dot rachwal at gmail dot com
2007-05-16 18:48 ` [Bug c++/31960] " pinskia at gcc dot gnu dot org
2007-05-17 14:55 ` bangerth at dealii dot org
2007-06-06  9:44 ` waldemar dot rachwal at gmail dot com [this message]
2007-06-06 21:11 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070606094408.5236.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).