Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b8cd3996
Commit
b8cd3996
authored
Nov 15, 2014
by
Jason Merrill
Committed by
Jason Merrill
Nov 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* constexpr.c (cx_check_missing_mem_inits): Clarify error message.
From-SVN: r217616
parent
f5f08264
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
7 deletions
+12
-7
gcc/cp/ChangeLog
+4
-0
gcc/cp/constexpr.c
+3
-2
gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C
+1
-1
gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
+1
-1
gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C
+1
-1
gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
+1
-1
gcc/testsuite/g++.dg/cpp0x/nsdmi3.C
+1
-1
No files found.
gcc/cp/ChangeLog
View file @
b8cd3996
2014-11-15 Jason Merrill <jason@redhat.com>
* constexpr.c (cx_check_missing_mem_inits): Clarify error message.
2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
* semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
...
...
gcc/cp/constexpr.c
View file @
b8cd3996
...
...
@@ -716,8 +716,9 @@ cx_check_missing_mem_inits (tree fun, tree body, bool complain)
}
if
(
!
complain
)
return
true
;
error
(
"uninitialized member %qD in %<constexpr%> constructor"
,
field
);
error
(
"member %qD must be initialized by mem-initializer "
"in %<constexpr%> constructor"
,
field
);
inform
(
DECL_SOURCE_LOCATION
(
field
),
"declared here"
);
bad
=
true
;
}
if
(
field
==
NULL_TREE
)
...
...
gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C
View file @
b8cd3996
...
...
@@ -3,5 +3,5 @@
struct
A
{
int
i
;
constexpr
A
()
{
}
// { dg-error "
uninitialized member .
A::i" }
constexpr
A
()
{
}
// { dg-error "A::i" }
};
gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
View file @
b8cd3996
...
...
@@ -21,5 +21,5 @@ struct A1
struct
B1
{
A1
a1
;
constexpr
B1
()
{}
// { dg-error "
uninitialized member
" }
constexpr
B1
()
{}
// { dg-error "
B1::a1
" }
};
gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C
View file @
b8cd3996
...
...
@@ -6,7 +6,7 @@
struct
A
{
int
i
;
constexpr
A
(
int
_i
)
{
i
=
_i
;
}
// { dg-error "empty body|
uninitialized member
" }
constexpr
A
(
int
_i
)
{
i
=
_i
;
}
// { dg-error "empty body|
A::i
" }
};
template
<
class
T
>
...
...
gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
View file @
b8cd3996
...
...
@@ -3,7 +3,7 @@
template
<
class
T
>
struct
A
{
T
t
;
constexpr
A
()
{
}
// { dg-error "
uninitialized
" }
constexpr
A
()
{
}
// { dg-error "
::t
" }
};
int
main
()
...
...
gcc/testsuite/g++.dg/cpp0x/nsdmi3.C
View file @
b8cd3996
...
...
@@ -15,4 +15,4 @@ struct B
constexpr
B
b
;
// { dg-error "B::B" }
// { dg-prune-output "
uninitialized member
" }
// { dg-prune-output "
B::a1
" }
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment