6.0.0-0.6

This commit is contained in:
Jakub Jelinek 2016-01-28 22:23:11 +01:00
parent cc2a83d686
commit d85626def8
5 changed files with 157 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/gcc-6.0.0-20160127.tar.bz2
/gcc-6.0.0-20160128.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20160127
%global SVNREV 232870
%global DATE 20160128
%global SVNREV 232948
%global gcc_version 6.0.0
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 0.5
%global gcc_release 0.6
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
# Hardening slows the compiler way too much.
@ -206,6 +206,8 @@ Patch10: gcc6-no-add-needed.patch
Patch11: gcc6-libgo-p224.patch
Patch12: gcc6-aarch64-async-unw-tables.patch
Patch13: gcc6-libsanitize-aarch64-va42.patch
Patch14: gcc6-pr66869.patch
Patch15: gcc6-pr69126-revert.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -770,6 +772,8 @@ package or when debugging this package.
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch12 -p0 -b .aarch64-async-unw-tables~
%patch13 -p0 -b .libsanitize-aarch64-va42~
%patch14 -p0 -b .pr66869~
%patch15 -p0 -b .pr69126-revert~
%if 0%{?_enable_debug_packages}
mkdir dwz-wrapper
@ -3062,5 +3066,18 @@ fi
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Thu Jan 28 2016 Jakub Jelinek <jakub@redhat.com> 6.0.0-0.6
- update from the trunk
- PRs ada/69488, c++/24208, c++/67407, c++/69317, c++/69379, c++/69496,
c/68062, cilkplus/69267, debug/66869, fortran/62536, fortran/69422,
fortran/69484, libstdc++/69295, libstdc++/69450, lto/69254,
middle-end/69542, pch/68758, preprocessor/69126, rtl-opt/69447,
target/63679, target/68380, target/68986, target/69245, target/69305,
target/69512, tree-optimization/68398, tree-optimization/69166,
tree-optimization/69196, tree-optimization/69355,
tree-optimization/69466
- temporarily revert _Pragma location fix (PR preprocessor/69126)
- fix up -Wunused-function for C++ (PR debug/66869)
* Wed Jan 27 2016 Jakub Jelinek <jakub@redhat.com> 6.0.0-0.5
- new package

44
gcc6-pr66869.patch Normal file
View File

@ -0,0 +1,44 @@
2016-01-28 Jakub Jelinek <jakub@redhat.com>
PR debug/66869
* decl.c (wrapup_globals_for_namespace): Warn about unused static
function declarations.
* g++.dg/warn/Wunused-function2.C: New test.
--- gcc/cp/decl.c.jj 2016-01-25 09:31:01.000000000 +0100
+++ gcc/cp/decl.c 2016-01-28 13:14:10.783286136 +0100
@@ -879,6 +879,24 @@ wrapup_globals_for_namespace (tree name_
tree *vec = statics->address ();
int len = statics->length ();
+ if (warn_unused_function)
+ {
+ tree decl;
+ unsigned int i;
+ FOR_EACH_VEC_SAFE_ELT (statics, i, decl)
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_INITIAL (decl) == 0
+ && DECL_EXTERNAL (decl)
+ && !TREE_PUBLIC (decl)
+ && !DECL_ARTIFICIAL (decl)
+ && !TREE_NO_WARNING (decl))
+ {
+ warning (OPT_Wunused_function,
+ "%q+F declared %<static%> but never defined", decl);
+ TREE_NO_WARNING (decl) = 1;
+ }
+ }
+
/* Write out any globals that need to be output. */
return wrapup_global_declarations (vec, len);
}
--- gcc/testsuite/g++.dg/warn/Wunused-function2.C.jj 2016-01-28 13:40:10.201053364 +0100
+++ gcc/testsuite/g++.dg/warn/Wunused-function2.C 2016-01-28 13:41:43.006788487 +0100
@@ -0,0 +1,6 @@
+// PR debug/66869
+// { dg-do compile }
+// { dg-options "-Wunused-function" }
+
+static void test (void); // { dg-warning "'void test..' declared 'static' but never defined" }
+int i;

91
gcc6-pr69126-revert.patch Normal file
View File

@ -0,0 +1,91 @@
Revert:
2016-01-28 Jakub Jelinek <jakub@redhat.com>
* directives.c (destringize_and_run): Adjust prototype.
2016-01-27 David Malcolm <dmalcolm@redhat.com>
PR preprocessor/69126
* directives.c (destringize_and_run): Add expansion_loc param; use
it when handling unexpanded pragmas to fixup the locations of the
synthesized tokens.
(_cpp_do__Pragma): Add expansion_loc param and use it when calling
destringize_and_run.
* internal.h (_cpp_do__Pragma): Add expansion_loc param.
* macro.c (builtin_macro): Pass expansion location of _Pragma to
_cpp_do__Pragma.
--- libcpp/macro.c (revision 232893)
+++ libcpp/macro.c (revision 232892)
@@ -430,7 +430,7 @@ builtin_macro (cpp_reader *pfile, cpp_ha
if (pfile->state.in_directive)
return 0;
- return _cpp_do__Pragma (pfile, loc);
+ return _cpp_do__Pragma (pfile);
}
buf = _cpp_builtin_macro_text (pfile, node);
--- libcpp/directives.c (revision 232928)
+++ libcpp/directives.c (revision 232892)
@@ -122,8 +122,7 @@ static void do_pragma_error (cpp_reader
static void do_linemarker (cpp_reader *);
static const cpp_token *get_token_no_padding (cpp_reader *);
static const cpp_token *get__Pragma_string (cpp_reader *);
-static void destringize_and_run (cpp_reader *, const cpp_string *,
- source_location);
+static void destringize_and_run (cpp_reader *, const cpp_string *);
static int parse_answer (cpp_reader *, struct answer **, int, source_location);
static cpp_hashnode *parse_assertion (cpp_reader *, struct answer **, int);
static struct answer ** find_answer (cpp_hashnode *, const struct answer *);
@@ -1753,8 +1752,7 @@ get__Pragma_string (cpp_reader *pfile)
/* Destringize IN into a temporary buffer, by removing the first \ of
\" and \\ sequences, and process the result as a #pragma directive. */
static void
-destringize_and_run (cpp_reader *pfile, const cpp_string *in,
- source_location expansion_loc)
+destringize_and_run (cpp_reader *pfile, const cpp_string *in)
{
const unsigned char *src, *limit;
char *dest, *result;
@@ -1834,12 +1832,6 @@ destringize_and_run (cpp_reader *pfile,
toks = XRESIZEVEC (cpp_token, toks, maxcount);
}
toks[count] = *cpp_get_token (pfile);
- /* _Pragma is a builtin, so we're not within a macro-map, and so
- the token locations are set to bogus ordinary locations
- near to, but after that of the "_Pragma".
- Paper over this by setting them equal to the location of the
- _Pragma itself (PR preprocessor/69126). */
- toks[count].src_loc = expansion_loc;
/* Macros have been already expanded by cpp_get_token
if the pragma allowed expansion. */
toks[count++].flags |= NO_EXPAND;
@@ -1874,14 +1866,14 @@ destringize_and_run (cpp_reader *pfile,
/* Handle the _Pragma operator. Return 0 on error, 1 if ok. */
int
-_cpp_do__Pragma (cpp_reader *pfile, source_location expansion_loc)
+_cpp_do__Pragma (cpp_reader *pfile)
{
const cpp_token *string = get__Pragma_string (pfile);
pfile->directive_result.type = CPP_PADDING;
if (string)
{
- destringize_and_run (pfile, &string->val.str, expansion_loc);
+ destringize_and_run (pfile, &string->val.str);
return 1;
}
cpp_error (pfile, CPP_DL_ERROR,
--- libcpp/internal.h (revision 232893)
+++ libcpp/internal.h (revision 232892)
@@ -688,7 +688,7 @@ extern int _cpp_handle_directive (cpp_re
extern void _cpp_define_builtin (cpp_reader *, const char *);
extern char ** _cpp_save_pragma_names (cpp_reader *);
extern void _cpp_restore_pragma_names (cpp_reader *, char **);
-extern int _cpp_do__Pragma (cpp_reader *, source_location);
+extern int _cpp_do__Pragma (cpp_reader *);
extern void _cpp_init_directives (cpp_reader *);
extern void _cpp_init_internal_pragmas (cpp_reader *);
extern void _cpp_do_file_change (cpp_reader *, enum lc_reason, const char *,

View File

@ -1 +1 @@
baec2d13c73d2f4210668dc58b6d30a4 gcc-6.0.0-20160127.tar.bz2
cbd21a4b3232d4202dd894f4587932d7 gcc-6.0.0-20160128.tar.bz2