public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
       [not found] <bug-41759-4@http.gcc.gnu.org/bugzilla/>
@ 2015-04-08 16:24 ` redi at gcc dot gnu.org
  2015-04-08 16:26 ` redi at gcc dot gnu.org
  2015-04-08 17:46 ` webrown.cpp at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-08 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-08
     Ever confirmed|0                           |1

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #2)
> Or, if we really wants positive forms, I would suggest:
> 
> "template parameter _UIntType is an unsigned integral type"

Or maybe:

"template parameter _UIntType must be an unsigned integral type"


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

* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
       [not found] <bug-41759-4@http.gcc.gnu.org/bugzilla/>
  2015-04-08 16:24 ` [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive redi at gcc dot gnu.org
@ 2015-04-08 16:26 ` redi at gcc dot gnu.org
  2015-04-08 17:46 ` webrown.cpp at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-08 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And we could replace the clunky "template argument substituting _UIntType" with
simply "result_type" e.g.

  "result_type must be an unsigned integer type"


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

* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
       [not found] <bug-41759-4@http.gcc.gnu.org/bugzilla/>
  2015-04-08 16:24 ` [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive redi at gcc dot gnu.org
  2015-04-08 16:26 ` redi at gcc dot gnu.org
@ 2015-04-08 17:46 ` webrown.cpp at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: webrown.cpp at gmail dot com @ 2015-04-08 17:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from W E Brown <webrown.cpp at gmail dot com> ---
I hadn't realized this was still open :)

FWIW, my paper N3846
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3846.pdf) summarizes
on p. 3 my recommended "guidelines for programmers to follow in crafting
diagnostic messages for users" as follows:

• Provide explicit indication that something has gone wrong:
  – Users are lost when they make mistakes with no feedback.
  – Be specific in describing the exact problem;
    avoid vague generalities or generic messages (e.g., "syntax error").

• Use human-readable (i.e., comprehensible) language:
  – Avoid abbr’s and codes (e.g., "type 2 error").
  – Use polite and grammatically correct phrasing.
  – Neither blame users nor imply they are stupid or doing something wrong 
    (e.g., "illegal command").
  – Be affirmative.

• Above all, be helpful; provide constructive advice:
  – Tell users how to address the problem.
  – Use error messages as an educational resource to impart a small amount 
    of knowledge to users.

[To give due credit, I many years ago paraphrased, rearranged, and reformatted
these based in significant part on Jakob Nielsen's article “Error Message
Guidelines.” (Nielsen Norman Group, 2001-06-24. http://www.
nngroup.com/articles/error-message-guidelines/).]
>From gcc-bugs-return-483036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 08 18:19:25 2015
Return-Path: <gcc-bugs-return-483036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 77094 invoked by alias); 8 Apr 2015 18:19:25 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 77064 invoked by uid 48); 8 Apr 2015 18:19:21 -0000
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/65702] New: [5 Regression] ICE (tree check: expected ssa_name, have var_decl in expand_gimple_basic_block, at cfgexpand.c:5506) on arm-linux-gnueabihf
Date: Wed, 08 Apr 2015 18:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: doko at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-65702-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg00588.txt.bz2
Content-length: 3028

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide702

            Bug ID: 65702
           Summary: [5 Regression] ICE (tree check: expected ssa_name,
                    have var_decl in expand_gimple_basic_block, at
                    cfgexpand.c:5506) on arm-linux-gnueabihf
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

seen with r221867 on arm-linux-gbueabihf

$cat palette.ii
class A {
  int m_fn1() const;
};
int a[1];
int b;
int A::m_fn1() const {
  register int c asm("");
  while (b)
    if (a[5])
      c = b;
  return c;
}

$ g++ -c -g -O2 -std=gnu++11 palette.ii
palette.ii: In member function 'int A::m_fn1() const':
palette.ii:7:16: error: invalid register name for 'c'
   register int c asm("");
                ^
palette.ii:6:5: internal compiler error: tree check: expected ssa_name, have
var_decl in expand_gimple_basic_block, at cfgexpand.c:5506
 int A::m_fn1() const {
     ^
0x8243dd tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../src/gcc/tree.c:9297
0x39e455 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../src/gcc/tree.h:2846
0x39e455 expand_gimple_basic_block
        ../../src/gcc/cfgexpand.c:5506
0x39ec81 execute
        ../../src/gcc/cfgexpand.c:6127
Please submit a full bug report,
with preprocessed source if appropriate.

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5-20150404-0ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=c++98 --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--disable-werror --enable-multilib --enable-checking=yes
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 5.0.0 20150404 (experimental) [trunk revision 221867] (Ubuntu
5-20150404-0ubuntu11)


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

* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
  2009-10-19 21:58 [Bug libstdc++/41759] New: " bkoz at gcc dot gnu dot org
  2009-10-20  2:46 ` [Bug libstdc++/41759] " paolo dot carlini at oracle dot com
  2009-10-20  3:13 ` paolo dot carlini at oracle dot com
@ 2009-10-30 17:39 ` paolo at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu dot org @ 2009-10-30 17:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo at gcc dot gnu dot org  2009-10-30 17:39 -------
Subject: Bug 41759

Author: paolo
Date: Fri Oct 30 17:39:18 2009
New Revision: 153762

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153762
Log:
2009-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

        PR libstdc++/41759
        * include/bits/random.h: Tweak a bit the text of some static_asserts.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/random.h


-- 


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


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

* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
  2009-10-19 21:58 [Bug libstdc++/41759] New: " bkoz at gcc dot gnu dot org
  2009-10-20  2:46 ` [Bug libstdc++/41759] " paolo dot carlini at oracle dot com
@ 2009-10-20  3:13 ` paolo dot carlini at oracle dot com
  2009-10-30 17:39 ` paolo at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-10-20  3:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-10-20 03:13 -------
Or, if we really wants positive forms, I would suggest:

"template parameter _UIntType is an unsigned integral type"

and

"template parameter __m has bounds"

I'm ok with either.


-- 


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


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

* [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive
  2009-10-19 21:58 [Bug libstdc++/41759] New: " bkoz at gcc dot gnu dot org
@ 2009-10-20  2:46 ` paolo dot carlini at oracle dot com
  2009-10-20  3:13 ` paolo dot carlini at oracle dot com
  2009-10-30 17:39 ` paolo at gcc dot gnu dot org
  2 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-10-20  2:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2009-10-20 02:45 -------
In fact, I have only *extended* the existing static_asserts to cover the type
too, not just the bounds, thus avoiding the legacy simulated concept checks. 
In general, I followed the existing practice about negative vs positive.

I think the real confusion is that in general we want to talk about *arguments*
not *parameters*, therefore we want to say "argument substituting _UIntType not
an unsigned integral type", and "template argument substituting __m out of
bounds". I'm in favor of that change.


-- 


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


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

end of thread, other threads:[~2015-04-08 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41759-4@http.gcc.gnu.org/bugzilla/>
2015-04-08 16:24 ` [Bug libstdc++/41759] [C++0x] <random> static_assert phrasing should be positive redi at gcc dot gnu.org
2015-04-08 16:26 ` redi at gcc dot gnu.org
2015-04-08 17:46 ` webrown.cpp at gmail dot com
2009-10-19 21:58 [Bug libstdc++/41759] New: " bkoz at gcc dot gnu dot org
2009-10-20  2:46 ` [Bug libstdc++/41759] " paolo dot carlini at oracle dot com
2009-10-20  3:13 ` paolo dot carlini at oracle dot com
2009-10-30 17:39 ` paolo at gcc dot gnu 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).