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
bc3e284b
Commit
bc3e284b
authored
13 years ago
by
Jason Merrill
Committed by
Jason Merrill
13 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pt.c (invalid_nontype_parm_type_p): Avoid printing "<type error>".
From-SVN: r181220
parent
ecf65859
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
5 deletions
+19
-5
gcc/cp/ChangeLog
+2
-0
gcc/cp/pt.c
+7
-1
gcc/testsuite/ChangeLog
+6
-0
gcc/testsuite/g++.dg/cpp0x/variadic74.C
+2
-2
gcc/testsuite/g++.dg/template/crash53.C
+1
-1
gcc/testsuite/g++.dg/template/void9.C
+1
-1
No files found.
gcc/cp/ChangeLog
View file @
bc3e284b
2011-11-09 Jason Merrill <jason@redhat.com>
* pt.c (invalid_nontype_parm_type_p): Avoid printing "<type error>".
* pt.c (convert_nontype_argument): Only integral arguments
get early folding.
...
...
This diff is collapsed.
Click to expand it.
gcc/cp/pt.c
View file @
bc3e284b
...
...
@@ -18976,7 +18976,13 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)
return
0
;
if
(
complain
&
tf_error
)
error
(
"%q#T is not a valid type for a template constant parameter"
,
type
);
{
if
(
type
==
error_mark_node
)
inform
(
input_location
,
"invalid template non-type parameter"
);
else
error
(
"%q#T is not a valid type for a template non-type parameter"
,
type
);
}
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/ChangeLog
View file @
bc3e284b
2011-11-09 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/variadic74.C: Adjust diags.
* g++.dg/template/crash53.C: Likewise.
* g++.dg/template/void9.C: Likewise.
2011-11-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51045
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/g++.dg/cpp0x/variadic74.C
View file @
bc3e284b
// { dg-
options "-std=gnu++0x"
}
// { dg-
do compile { target c++11 }
}
template
<
class
...
Types
>
class
A
{
public
:
template
<
Types
...
Values
>
class
X
{
/* ... */
};
// { dg-error "not a valid type for a template
constant
parameter" }
template
<
Types
...
Values
>
class
X
{
/* ... */
};
// { dg-error "not a valid type for a template
non-type
parameter" }
};
template
<
class
...
Types
>
class
B
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/g++.dg/template/crash53.C
View file @
bc3e284b
...
...
@@ -5,7 +5,7 @@ template<int> struct A {};
template
<
typename
T
>
struct
B
{
template
<
T
I
>
B
(
A
<
I
>
);
// { dg-error "template
constant
parameter" }
template
<
T
I
>
B
(
A
<
I
>
);
// { dg-error "template
non-type
parameter" }
};
B
<
double
>
a
=
A
<
0
>
();
// { dg-error "non-scalar type" }
This diff is collapsed.
Click to expand it.
gcc/testsuite/g++.dg/template/void9.C
View file @
bc3e284b
//PR c++/28738
template
<
int
,
void
>
struct
A
{};
// { dg-error "not a valid type" }
template
<
int
N
>
struct
A
<
N
,
0
>
{};
// { dg-
error "not a valid type
" }
template
<
int
N
>
struct
A
<
N
,
0
>
{};
// { dg-
message "invalid
" }
This diff is collapsed.
Click to expand it.
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