public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55080] New: -pedantic produces error: floating-point literal cannot appear in a constant-expression
@ 2012-10-26 11:35 manu at gcc dot gnu.org
2012-10-26 11:40 ` [Bug c++/55080] " manu at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-26 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55080
Bug #: 55080
Summary: -pedantic produces error: floating-point literal
cannot appear in a constant-expression
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
CC: fang@csl.cornell.edu, manu@gcc.gnu.org, matz@suse.de,
papadopo@shfj.cea.fr, rearnsha@gcc.gnu.org,
rguenth@gcc.gnu.org, rnewman@compubrite.com
Depends on: 11393
Build: any
+++ This bug was initially created as a clone of Bug #11393 +++
class B {
static const int c = 3.1415926;
};
-std=c++98 -pedantic gives
error: floating-point literal cannot appear in a constant-expression
static const int c = 3.1415926;
^
and -std=c++98 gives nothing. Both -std=c++11 -pedantic and just -std=c++11
report nothing.
This is a bug. -pedantic should not produce errors. If this is a GNU extension
in c++98 mode, then it should produce a warning like:
warning: ISO C++98 forbids using a floating-point literal in a
constant-expression [-Wpedantic]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55080] -pedantic produces error: floating-point literal cannot appear in a constant-expression
2012-10-26 11:35 [Bug c++/55080] New: -pedantic produces error: floating-point literal cannot appear in a constant-expression manu at gcc dot gnu.org
@ 2012-10-26 11:40 ` manu at gcc dot gnu.org
2012-10-26 12:11 ` redi at gcc dot gnu.org
2015-04-29 13:52 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-26 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55080
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|accepts-invalid |diagnostic
CC|fang at csl dot |
|cornell.edu, matz at suse |
|dot de, papadopo at shfj |
|dot cea.fr, rearnsha at gcc |
|dot gnu.org, rguenth at gcc |
|dot gnu.org, rnewman at |
|compubrite dot com |
Depends on|11393 |
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-26 11:40:05 UTC ---
I shouldn't have used clone bug...
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55080] -pedantic produces error: floating-point literal cannot appear in a constant-expression
2012-10-26 11:35 [Bug c++/55080] New: -pedantic produces error: floating-point literal cannot appear in a constant-expression manu at gcc dot gnu.org
2012-10-26 11:40 ` [Bug c++/55080] " manu at gcc dot gnu.org
@ 2012-10-26 12:11 ` redi at gcc dot gnu.org
2015-04-29 13:52 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2012-10-26 12:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55080
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-26
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-26 12:10:43 UTC ---
cp_parser_primary_expression in parser.c only calls
cp_parser_non_integral_constant_expression (which prints the error) when
pedantic is false
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55080] -pedantic produces error: floating-point literal cannot appear in a constant-expression
2012-10-26 11:35 [Bug c++/55080] New: -pedantic produces error: floating-point literal cannot appear in a constant-expression manu at gcc dot gnu.org
2012-10-26 11:40 ` [Bug c++/55080] " manu at gcc dot gnu.org
2012-10-26 12:11 ` redi at gcc dot gnu.org
@ 2015-04-29 13:52 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2015-04-29 13:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55080
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |easyhack
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This should be an easy fix once a solution and the text is agreed.
>From gcc-bugs-return-484984-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 29 13:52:19 2015
Return-Path: <gcc-bugs-return-484984-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 42847 invoked by alias); 29 Apr 2015 13:52:19 -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 42779 invoked by uid 48); 29 Apr 2015 13:52:11 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55080] -pedantic produces error: floating-point literal cannot appear in a constant-expression
Date: Wed, 29 Apr 2015 13:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: diagnostic, easyhack
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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:
Message-ID: <bug-55080-4-7mDnxIFDRB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55080-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55080-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg02536.txt.bz2
Content-length: 208
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55080
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This should be an easy fix once a solution and the text is agreed.
>From gcc-bugs-return-484985-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 29 13:53:51 2015
Return-Path: <gcc-bugs-return-484985-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 48183 invoked by alias); 29 Apr 2015 13:53:50 -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 48136 invoked by uid 48); 29 Apr 2015 13:53:47 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55095] Wshift-overflow
Date: Wed, 29 Apr 2015 13:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-55095-4-id5NF9VwXi@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55095-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55095-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg02537.txt.bz2
Content-length: 523
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55095
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Marek has been doing some nice work with shift warnings lately, perhaps he
knows how to tackle this.
>From gcc-bugs-return-484986-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 29 13:56:51 2015
Return-Path: <gcc-bugs-return-484986-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 74877 invoked by alias); 29 Apr 2015 13:56:51 -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 74595 invoked by uid 48); 29 Apr 2015 13:56:47 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/52899] tabstop has no effect
Date: Wed, 29 Apr 2015 13:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: preprocessor
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-52899-4-JXnkyGscNU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52899-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52899-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg02538.txt.bz2
Content-length: 684
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52899
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmalcolm at gcc dot gnu.org,
| |tromey at gcc dot gnu.org
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Recent discussion about this:
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00888.html
Joseph thinks it should be fixed:
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01797.html
>From gcc-bugs-return-484988-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 29 14:07:56 2015
Return-Path: <gcc-bugs-return-484988-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 99725 invoked by alias); 29 Apr 2015 14:07:56 -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 99680 invoked by uid 48); 29 Apr 2015 14:07:49 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64667] -Winit-self ignored for reference fields
Date: Wed, 29 Apr 2015 14:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution target_milestone
Message-ID: <bug-64667-4-bY2CjwTxqW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64667-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64667-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/msg02540.txt.bz2
Content-length: 489
https://gcc.gnu.org/bugzilla/show_bug.cgi?idd667
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-29 13:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-26 11:35 [Bug c++/55080] New: -pedantic produces error: floating-point literal cannot appear in a constant-expression manu at gcc dot gnu.org
2012-10-26 11:40 ` [Bug c++/55080] " manu at gcc dot gnu.org
2012-10-26 12:11 ` redi at gcc dot gnu.org
2015-04-29 13:52 ` manu at gcc dot gnu.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).