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
24847495
Commit
24847495
authored
13 years ago
by
Jason Merrill
Committed by
Jason Merrill
13 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* typeck.c (check_literal_operator_args): Avoid building types.
From-SVN: r180538
parent
1ca3916f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
gcc/cp/ChangeLog
+4
-0
gcc/cp/typeck.c
+18
-15
No files found.
gcc/cp/ChangeLog
View file @
24847495
2011-10-26 Jason Merrill <jason@redhat.com>
* typeck.c (check_literal_operator_args): Avoid building types.
2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
Implement C++11 user-defined literals.
...
...
This diff is collapsed.
Click to expand it.
gcc/cp/typeck.c
View file @
24847495
...
...
@@ -8405,12 +8405,6 @@ check_literal_operator_args (const_tree decl,
bool
found_string_p
=
false
;
bool
maybe_raw_p
=
false
;
bool
found_size_p
=
false
;
tree
const_wchar_ptr_type_node
=
build_pointer_type
(
build_type_variant
(
wchar_type_node
,
1
,
0
));
tree
const_char16_ptr_type_node
=
build_pointer_type
(
build_type_variant
(
char16_type_node
,
1
,
0
));
tree
const_char32_ptr_type_node
=
build_pointer_type
(
build_type_variant
(
char32_type_node
,
1
,
0
));
*
long_long_unsigned_p
=
false
;
*
long_double_p
=
false
;
...
...
@@ -8423,17 +8417,26 @@ check_literal_operator_args (const_tree decl,
tree
t
=
TREE_VALUE
(
argtype
);
++
arity
;
if
(
same_type_p
(
t
,
const_string_type_node
)
)
if
(
TREE_CODE
(
t
)
==
POINTER_TYPE
)
{
found_string_p
=
true
;
maybe_raw_p
=
true
;
t
=
TREE_TYPE
(
t
);
if
(
cp_type_quals
(
t
)
!=
TYPE_QUAL_CONST
)
return
false
;
t
=
TYPE_MAIN_VARIANT
(
t
);
if
(
same_type_p
(
t
,
char_type_node
))
{
found_string_p
=
true
;
maybe_raw_p
=
true
;
}
else
if
(
same_type_p
(
t
,
wchar_type_node
))
found_string_p
=
true
;
else
if
(
same_type_p
(
t
,
char16_type_node
))
found_string_p
=
true
;
else
if
(
same_type_p
(
t
,
char32_type_node
))
found_string_p
=
true
;
else
return
false
;
}
else
if
(
same_type_p
(
t
,
const_wchar_ptr_type_node
))
found_string_p
=
true
;
else
if
(
same_type_p
(
t
,
const_char16_ptr_type_node
))
found_string_p
=
true
;
else
if
(
same_type_p
(
t
,
const_char32_ptr_type_node
))
found_string_p
=
true
;
else
if
(
same_type_p
(
t
,
size_type_node
))
{
if
(
!
found_string_p
)
...
...
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