public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer"
@ 2014-01-24 23:39 richard-gccbugzilla at metafoo dot co.uk
2014-07-02 9:30 ` [Bug c++/59937] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-01-24 23:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
Bug ID: 59937
Summary: [constexpr] bogus diagnostic "used in its own
initializer"
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
GCC rejects this:
constexpr const char * const &r = "";
constexpr const char * const &s = r;
with this bogus diagnostic:
test.cpp:2:35: error: the value of ‘r’ is not usable in a constant expression
constexpr const char * const &s = r;
^
test.cpp:1:31: note: ‘r’ used in its own initializer
constexpr const char * const &r = "";
^
>From gcc-bugs-return-441502-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 24 23:54:08 2014
Return-Path: <gcc-bugs-return-441502-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2333 invoked by alias); 24 Jan 2014 23:54:07 -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 2314 invoked by uid 48); 24 Jan 2014 23:54:04 -0000
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59938] New: [C++11] Bogus "... is not a constant expression"
Date: Fri, 24 Jan 2014 23:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ppluzhnikov at google dot com
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-59938-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: 2014-01/txt/msg02644.txt.bz2
Content-length: 686
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY938
Bug ID: 59938
Summary: [C++11] Bogus "... is not a constant expression"
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppluzhnikov at google dot com
Test:
struct Data { const char* const& name; };
constexpr Data d = { "" };
Using g++ (GCC) 4.9.0 20140122 (experimental):
g++ -c -std=c++11 t.cc
t.cc:2:25: error: 'const Data{(* & _ZGRL1d0)}' is not a constant expression
constexpr Data d = { "" };
^
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
@ 2014-07-02 9:30 ` redi at gcc dot gnu.org
2015-01-14 12:27 ` jota.uve at hotmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2014-07-02 9:30 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 15427 bytes --]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-07-02
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Maybe related:
template<typename T> constexpr bool truth(const T&) { return true; }
template<typename T>
void test()
{
int i[1];
constexpr bool untrue = !truth(i);
static_assert(!untrue, "");
}
ce.cc: In function âvoid test()â:
ce.cc:8:3: error: non-constant condition for static assertion
static_assert(!untrue, "");
^
ce.cc:8:3: error: the value of âuntrueâ is not usable in a constant expression
ce.cc:7:18: note: âuntrueâ used in its own initializer
constexpr bool untrue = !truth(i);
^
>From gcc-bugs-return-455480-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 02 09:39:10 2014
Return-Path: <gcc-bugs-return-455480-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25054 invoked by alias); 2 Jul 2014 09:39:09 -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 24412 invoked by uid 48); 2 Jul 2014 09:38:59 -0000
From: "ketelbinkje at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61668] New: Division returns an error in some cases
Date: Wed, 02 Jul 2014 09:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: ketelbinkje at gmail dot com
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 attachments.created
Message-ID: <bug-61668-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: 2014-07/txt/msg00071.txt.bz2
Content-length: 12780
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61668
Bug ID: 61668
Summary: Division returns an error in some cases
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ketelbinkje at gmail dot com
Created attachment 33043
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33043&action=edit
A screen shot of the moment the error was detected
The issue:
The program wants to divide 59 by 100. The expected result is 0.59. The program
returns 0.58999999999999997. The next division r = dSeconds / (1000 * pow(10,
ceil(log10(x)))) returns the correct result.
Hardware:
HP 4600
Platform: Linux Mint 17 Cinnamon 64-bit
Cinamon version 2.2.13
Linux kernel 3.13.0-24-generic
Intel Xeon CPU 5140
Memory 7,8 GiB
Compiler and IDE:
g++ compiler version 4.8.2.
Code Blocks 13.12
The build log:
-------------- Clean: Debug in GCD (compiler: GNU GCC Compiler)---------------
Cleaned "GCD - Debug"
-------------- Build: Debug in GCD (compiler: GNU GCC Compiler)---------------
g++ -Wundef -Wunreachable-code -Weffc++ -std=c++11 -Wextra -Wall -g
-fexceptions -Wundef -Wunreachable-code -Wmissing-declarations -Wswitch-enum
-Wswitch-default -Weffc++ -std=c++11 -g -c
/home/fradiavolo/Projects/GCD/c_circlenavigation.cpp -o
obj/Debug/c_circlenavigation.o
In file included from /home/fradiavolo/Projects/GCD/c_circlenavigation.h:4:0,
from /home/fradiavolo/Projects/GCD/c_circlenavigation.cpp:1:
/home/fradiavolo/Projects/GCD/geotools.h:57:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Degrees_2_Radians(const double);
^
/home/fradiavolo/Projects/GCD/geotools.h:58:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Radians_2_Degrees(const double);
^
In file included from /home/fradiavolo/Projects/GCD/c_circlenavigation.h:4:0,
from /home/fradiavolo/Projects/GCD/c_circlenavigation.cpp:1:
/home/fradiavolo/Projects/GCD/geotools.h:61:165: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_Correct_GeoCoordinate(const string sCoordinate = "",
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:64:169: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_ConvertCordinate_2_Double(const string sGeoCoordinate,
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:67:34: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_ErrFlag(void) {return ErrFlag; };
^
g++ -Wundef -Wunreachable-code -Weffc++ -std=c++11 -Wextra -Wall -g
-fexceptions -Wundef -Wunreachable-code -Wmissing-declarations -Wswitch-enum
-Wswitch-default -Weffc++ -std=c++11 -g -c
/home/fradiavolo/Projects/GCD/geotools.cpp -o obj/Debug/geotools.o
In file included from /home/fradiavolo/Projects/GCD/geotools.cpp:1:0:
/home/fradiavolo/Projects/GCD/geotools.h:57:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Degrees_2_Radians(const double);
^
/home/fradiavolo/Projects/GCD/geotools.h:58:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Radians_2_Degrees(const double);
^
In file included from /home/fradiavolo/Projects/GCD/geotools.cpp:1:0:
/home/fradiavolo/Projects/GCD/geotools.h:61:165: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_Correct_GeoCoordinate(const string sCoordinate = "",
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:64:169: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_ConvertCordinate_2_Double(const string sGeoCoordinate,
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:67:34: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_ErrFlag(void) {return ErrFlag; };
^
/home/fradiavolo/Projects/GCD/geotools.cpp: In constructor
âC_GeoTools::C_GeoTools()â:
/home/fradiavolo/Projects/GCD/geotools.cpp:11:1: warning: âC_GeoTools::ErrFlagâ
should be initialized in the member initialization list [-Weffc++]
C_GeoTools::C_GeoTools()
^
/home/fradiavolo/Projects/GCD/geotools.cpp:11:1: warning: âC_GeoTools::ErrMsgâ
should be initialized in the member initialization list [-Weffc++]
/home/fradiavolo/Projects/GCD/geotools.cpp: At global scope:
/home/fradiavolo/Projects/GCD/geotools.cpp:34:67: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double C_GeoTools::m_Degrees_2_Radians(const double dDegrees)
^
/home/fradiavolo/Projects/GCD/geotools.cpp:48:67: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double C_GeoTools::m_Radians_2_Degrees(const double dRadians)
^
/home/fradiavolo/Projects/GCD/geotools.cpp:60:116: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool C_GeoTools::m_Correct_GeoCoordinate(const string sCoordinate, const
CoordinateType::CoordinateProperty T)
^
/home/fradiavolo/Projects/GCD/geotools.cpp:121:125: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double C_GeoTools::m_ConvertCordinate_2_Double(const string
sGeoCoordinate, const CoordinateType::CoordinateProperty T)
^
/home/fradiavolo/Projects/GCD/geotools.cpp: In member function âconst double
C_GeoTools::m_ConvertCordinate_2_Double(std::string,
C_GeoTools::CoordinateType::CoordinateProperty)â:
/home/fradiavolo/Projects/GCD/geotools.cpp:144:16: warning: variable âpâ set
but not used [-Wunused-but-set-variable]
double p = 0.0;
^
/home/fradiavolo/Projects/GCD/geotools.cpp:145:16: warning: variable âqâ set
but not used [-Wunused-but-set-variable]
double q = 0.0;
^
/home/fradiavolo/Projects/GCD/geotools.cpp:146:16: warning: variable ârâ set
but not used [-Wunused-but-set-variable]
double r = 0.0;
^
g++ -Wundef -Wunreachable-code -Weffc++ -std=c++11 -Wextra -Wall -g
-fexceptions -Wundef -Wunreachable-code -Wmissing-declarations -Wswitch-enum
-Wswitch-default -Weffc++ -std=c++11 -g -c
/home/fradiavolo/Projects/GCD/main.cpp -o obj/Debug/main.o
In file included from /home/fradiavolo/Projects/GCD/c_circlenavigation.h:4:0,
from /home/fradiavolo/Projects/GCD/main.cpp:1:
/home/fradiavolo/Projects/GCD/geotools.h:57:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Degrees_2_Radians(const double);
^
/home/fradiavolo/Projects/GCD/geotools.h:58:54: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_Radians_2_Degrees(const double);
^
In file included from /home/fradiavolo/Projects/GCD/c_circlenavigation.h:4:0,
from /home/fradiavolo/Projects/GCD/main.cpp:1:
/home/fradiavolo/Projects/GCD/geotools.h:61:165: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_Correct_GeoCoordinate(const string sCoordinate = "",
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:64:169: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const double m_ConvertCordinate_2_Double(const string sGeoCoordinate,
const CoordinateType::CoordinateProperty t =
CoordinateType::CoordinateProperty::Undefined);
^
/home/fradiavolo/Projects/GCD/geotools.h:67:34: warning: type qualifiers
ignored on function return type [-Wignored-qualifiers]
const bool m_ErrFlag(void) {return ErrFlag; };
^
g++ -o bin/Debug/GCD obj/Debug/c_circlenavigation.o obj/Debug/geotools.o
obj/Debug/main.o
Output file is bin/Debug/GCD with size 143,72 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 24 warning(s) (0 minute(s), 1 second(s))
>From gcc-bugs-return-455481-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 02 09:40:32 2014
Return-Path: <gcc-bugs-return-455481-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26991 invoked by alias); 2 Jul 2014 09:40:29 -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 26928 invoked by uid 48); 2 Jul 2014 09:40:24 -0000
From: "ketelbinkje at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61668] Division returns an error in some cases
Date: Wed, 02 Jul 2014 09:40: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: ketelbinkje at gmail dot com
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: attachments.created
Message-ID: <bug-61668-4-oidWimQmCe@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61668-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61668-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: 2014-07/txt/msg00072.txt.bz2
Content-length: 261
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida668
--- Comment #1 from Peter Ketel <ketelbinkje at gmail dot com> ---
Created attachment 33044
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id3044&actioníit
The next division returns the correct result
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
2014-07-02 9:30 ` [Bug c++/59937] " redi at gcc dot gnu.org
@ 2015-01-14 12:27 ` jota.uve at hotmail dot com
2015-01-14 12:49 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jota.uve at hotmail dot com @ 2015-01-14 12:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
Javier V. Gómez <jota.uve at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jota.uve at hotmail dot com
--- Comment #2 from Javier V. Gómez <jota.uve at hotmail dot com> ---
I found another case that worked in G++ 4.8.3 but fails in 4.9:
---------
main.cpp:
---------
int main ()
{
constexpr int n = 2;
A<n> a;
B b;
b.foo();
}
---------
a.hpp:
---------
template <size_t n> class A
{
static constexpr size_t getN() {return n;}
};
---------
b.hpp:
---------
class B
{
void foo ()
{
//has access to a A<n> object
constexpr int n = a.getN();
A<n> a2;
}
};
Compiler output:
B.hpp: error: the value of ‘n’ is not usable in a constant expression
A<n> a2;
^
B.hpp: note: ‘ndims’ used in its own initializer
constexpr int n = a.getN();
^
>From gcc-bugs-return-473185-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 12:27:07 2015
Return-Path: <gcc-bugs-return-473185-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13390 invoked by alias); 14 Jan 2015 12:27:06 -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 13329 invoked by uid 48); 14 Jan 2015 12:27:00 -0000
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/57518] [4.8 Regression] Redundant insn generated in LRA
Date: Wed, 14 Jan 2015 12:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ramana at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-57518-4-1VMwB83B6y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57518-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57518-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-01/txt/msg01179.txt.bz2
Content-length: 536
https://gcc.gnu.org/bugzilla/show_bug.cgi?idW518
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #12 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #11)
> GCC 4.8.4 has been released.
If this won't be backported to 4.8 why keep this open ?
Ramana
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
2014-07-02 9:30 ` [Bug c++/59937] " redi at gcc dot gnu.org
2015-01-14 12:27 ` jota.uve at hotmail dot com
@ 2015-01-14 12:49 ` redi at gcc dot gnu.org
2015-01-20 13:14 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-14 12:49 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 6116 bytes --]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Javier V. Gómez from comment #2)
> I found another case that worked in G++ 4.8.3 but fails in 4.9:
This example is complete nonsense. Why is it split across three files? Why
doesn't main.cpp include anything? Why is everything private? Why is 'a'
undeclared in B::foo()? Why does the diagnostic talk about 'ndims' which isn't
declared anywhere?
It's useless as a test or an example of the error.
>From gcc-bugs-return-473192-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 12:52:25 2015
Return-Path: <gcc-bugs-return-473192-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7357 invoked by alias); 14 Jan 2015 12:52:24 -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 7301 invoked by uid 48); 14 Jan 2015 12:52:20 -0000
From: "jota.uve at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
Date: Wed, 14 Jan 2015 12: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.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jota.uve at hotmail dot com
X-Bugzilla-Status: NEW
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-59937-4-wu3XywueZZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59937-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59937-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-01/txt/msg01186.txt.bz2
Content-length: 996
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
--- Comment #4 from Javier V. Gómez <jota.uve at hotmail dot com> ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Javier V. Gómez from comment #2)
> > I found another case that worked in G++ 4.8.3 but fails in 4.9:
>
> This example is complete nonsense. Why is it split across three files? Why
> doesn't main.cpp include anything? Why is everything private? Why is 'a'
> undeclared in B::foo()? Why does the diagnostic talk about 'ndims' which
> isn't declared anywhere?
>
> It's useless as a test or an example of the error.
I tried to simplify as much as possible the issue, since I detected the error
in a big piece of code. I didn't pretend to create a compilable example. ndims
is what I called n (copy and paste...).
The important point of my example is that constexpr int n = a.getN(); fails
when A::getN() just returns a template parameter value previously set by a
constexpr anywhere else.
>From gcc-bugs-return-473193-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 12:53:49 2015
Return-Path: <gcc-bugs-return-473193-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8648 invoked by alias); 14 Jan 2015 12:53:49 -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 8617 invoked by uid 55); 14 Jan 2015 12:53:45 -0000
From: "yroux at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/902] x86 optimization bug with sibling call and -fomit-frame-pointer
Date: Wed, 14 Jan 2015 12:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 2.97
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yroux at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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-902-4-O658tG43tr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-902-4@http.gcc.gnu.org/bugzilla/>
References: <bug-902-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-01/txt/msg01187.txt.bz2
Content-length: 960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id2
--- Comment #12 from Yvan Roux <yroux at gcc dot gnu.org> ---
Author: yroux
Date: Wed Jan 14 12:53:04 2015
New Revision: 219597
URL: https://gcc.gnu.org/viewcvs?rev!9597&root=gcc&view=rev
Log:
2015-01-14 Yvan Roux <yvan.roux@linaro.org>
Fix Linaro PR #902
Partial Backport from trunk r211798.
2014-06-18 Radovan Obradovic <robradovic@mips.com>
Tom de Vries <tom@codesourcery.com>
* config/arm/arm.c (arm_emit_call_insn): Add IP and CC clobbers to
CALL_INSN_FUNCTION_USAGE.
Backport from trunk r209800.
2014-04-25 Tom de Vries <tom@codesourcery.com>
* expr.c (clobber_reg_mode): New function.
* expr.h (clobber_reg): New function.
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/config/arm/arm.c
branches/linaro/gcc-4_9-branch/gcc/expr.c
branches/linaro/gcc-4_9-branch/gcc/expr.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
` (2 preceding siblings ...)
2015-01-14 12:49 ` redi at gcc dot gnu.org
@ 2015-01-20 13:14 ` paolo.carlini at oracle dot com
2015-01-20 13:39 ` paolo at gcc dot gnu.org
2015-01-20 13:40 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-20 13:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is fixed for 5.0. I'm adding the testcases and closing the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
` (3 preceding siblings ...)
2015-01-20 13:14 ` paolo.carlini at oracle dot com
@ 2015-01-20 13:39 ` paolo at gcc dot gnu.org
2015-01-20 13:40 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-01-20 13:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Jan 20 13:39:10 2015
New Revision: 219894
URL: https://gcc.gnu.org/viewcvs?rev=219894&root=gcc&view=rev
Log:
2015-01-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59937
* g++.dg/cpp0x/constexpr-59937-1.C: New.
* g++.dg/cpp0x/constexpr-59937-2.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-59937-1.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/59937] [constexpr] bogus diagnostic "used in its own initializer"
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
` (4 preceding siblings ...)
2015-01-20 13:39 ` paolo at gcc dot gnu.org
@ 2015-01-20 13:40 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-20 13:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-20 13:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 23:39 [Bug c++/59937] New: [constexpr] bogus diagnostic "used in its own initializer" richard-gccbugzilla at metafoo dot co.uk
2014-07-02 9:30 ` [Bug c++/59937] " redi at gcc dot gnu.org
2015-01-14 12:27 ` jota.uve at hotmail dot com
2015-01-14 12:49 ` redi at gcc dot gnu.org
2015-01-20 13:14 ` paolo.carlini at oracle dot com
2015-01-20 13:39 ` paolo at gcc dot gnu.org
2015-01-20 13:40 ` paolo.carlini at oracle dot com
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).