Suggestions

2014-11-30 Thread Ryan Nicholl
I was not able to register on the bug tracker, so I am posting a
couple feature requests here, I hope someone can repost them for me.

I would like to suggest -Wident=foo, such that it will warn each time
foo is encountered in the code. This is similar to [[deprecated]] but
it would allow the user to call this warning on code from third party
libraries unmodified.
Use cases: e.g., someone implemented "gets_widechar", so
"-Wident=gets_widechar".

Next suggestion is two C++ specific flags, "-Wextra-copy" and
"-felide-copies". "-Wextra-copy" warns when a soon expiring object is
copied instead of moved from. -felide-copies actually changes it to a
move instead of copy. Obviously this could cause bugs, so it should be
disabled by default even at -O2, probably -O3. The warning option
would give you a compromise in that it simply directs you to check
that this is what you meant to do. This warning should be suppressed
when copying from e.g., ints, of course (since it is the same as a
move.)

So for example:

extern void foo(std::string);

int main()
{
  std::string s;
  ...
  foo(s);
  return 0;
}

With "-Wextra-copy" would emit a warning for the line "foo(s);"; and,
with -felide-copies, it would change the copy to a move.

Note: I heard glibc++ internally uses copy-on-write for strings, so
this specific example may not be a problem, but it was just an
example.
-- 
Thank you,
Ryan P. Nicholl
Freelance C++ Developer
(678)358-7765
r.p.nich...@gmail.com


Re: Suggestions

2014-11-30 Thread Jonathan Wakely
On 30 November 2014 at 19:47, Ryan Nicholl wrote:
> I was not able to register on the bug tracker, so I am posting a
> couple feature requests here, I hope someone can repost them for me.

If you sent an email asking for the account to be created then it will
get done shortly.

If you didn't send an email ... well that's what you need to do :-)


gcc-5-20141130 is now available

2014-11-30 Thread gccadmin
Snapshot gcc-5-20141130 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/5-20141130/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 5 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 218190

You'll find:

 gcc-5-20141130.tar.bz2   Complete GCC

  MD5=9c6ab2f8dc6a6a8f43d4820da09072af
  SHA1=9ba3ef22e0a6c4df3eddc7fa145c463ad141279f

Diffs from 5-20141123 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-5
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.