public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104095] New: g++ diagnosis may use non-standard terminology: "constant" instead of "literal", "integer" instead of "integral"
@ 2022-01-18 13:51 pavel.morozkin at gmail dot com
  2022-01-18 14:11 ` [Bug c++/104095] " redi at gcc dot gnu.org
  2023-07-24  2:16 ` de34 at live dot cn
  0 siblings, 2 replies; 3+ messages in thread
From: pavel.morozkin at gmail dot com @ 2022-01-18 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104095
           Summary: g++ diagnosis may use non-standard terminology:
                    "constant" instead of "literal", "integer" instead of
                    "integral"
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pavel.morozkin at gmail dot com
  Target Milestone: ---

$ g++ t589.cpp -std=c++17 -pedantic -Wall -Wextra -c
t589.cpp:24:22: error: overflow in constant expression [-fpermissive]
   24 | enum { y = (int)(1e10) };
      |                      ^
t589.cpp:24:22: error: overflow in constant expression [-fpermissive]
t589.cpp:24:22: error: enumerator value for ‘y’ is not an integer constant

С++ standard does not have "integer constant". С++ standard has "integral
constant".

$ g++ t589.cpp -std=c++11 -pedantic -c
t589.cpp:25:11: warning: use of C++17 hexadecimal floating constant
   25 | float f = 0x0.123p-1f;

С++ standard does not have "hexadecimal floating constant". С++ standard has
"hexadecimal floating literal".

$ g++ t589.cpp -std=c++17 -pedantic -c
t589.cpp:25:1: warning: floating constant truncated to zero [-Woverflow]
   25 | float f = 0x0.123333p-1000f;

С++ standard does not have "floating constant". С++ standard has "floating
literal".

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

end of thread, other threads:[~2023-07-24  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 13:51 [Bug c++/104095] New: g++ diagnosis may use non-standard terminology: "constant" instead of "literal", "integer" instead of "integral" pavel.morozkin at gmail dot com
2022-01-18 14:11 ` [Bug c++/104095] " redi at gcc dot gnu.org
2023-07-24  2:16 ` de34 at live dot cn

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