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
15c2ccba
Commit
15c2ccba
authored
Jul 22, 2011
by
Jason Merrill
Committed by
Jason Merrill
Jul 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* doc/invoke.texi (C++ Dialect Options): Document -Wno-narrowing.
From-SVN: r176670
parent
5b960c5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
gcc/ChangeLog
+4
-0
gcc/doc/invoke.texi
+12
-0
gcc/testsuite/g++.dg/cpp0x/initlist55.C
+5
-0
No files found.
gcc/ChangeLog
View file @
15c2ccba
2011-07-22 Jason Merrill <jason@redhat.com>
* doc/invoke.texi (C++ Dialect Options): Document -Wno-narrowing.
2011-07-22 Richard Henderson <rth@redhat.com>
* bb-reorder.c (gate_handle_partition_blocks): Honor optimize.
...
...
gcc/doc/invoke.texi
View file @
15c2ccba
...
...
@@ -2348,6 +2348,18 @@ an instance of a derived class through a pointer to a base class if the
base class does not have a virtual destructor. This warning is enabled
by @option{-Wall}.
@item -Wno-narrowing @r{(C++ and Objective-C++ only)}
@opindex Wnarrowing
@opindex Wno-narrowing
With -std=c++0x, suppress the diagnostic required by the standard for
narrowing conversions within @samp{@{ @}}, e.g.
@smallexample
int i = @{ 2.2 @}; // error: narrowing from double to int
@end smallexample
This flag can be useful for compiling valid C++98 code in C++0x mode.
@item -Wnoexcept @r{(C++ and Objective-C++ only)}
@opindex Wnoexcept
@opindex Wno-noexcept
...
...
gcc/testsuite/g++.dg/cpp0x/initlist55.C
0 → 100644
View file @
15c2ccba
// Test for -Wno-narrowing
// { dg-options "-std=c++0x -pedantic-errors -Wno-narrowing" }
int
i
;
float
d
=
{
i
};
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