merge from gcc

This commit is contained in:
DJ Delorie 2011-08-06 18:40:27 +00:00
parent 2f7fb8e4c8
commit 6b6bd65aa5
4 changed files with 45 additions and 18 deletions

View File

@ -1,3 +1,13 @@
2011-08-06 Uros Bizjak <ubizjak@gmail.com>
* testsuite/test-expandargv.c (writeout_test): Check result of fwrite.
2011-08-01 Jason Merrill <jason@redhat.com>
PR c++/49932
* cp-demangle.c (d_prefix): Handle decltype.
* testsuite/demangle-expected: Test it.
2011-07-26 H.J. Lu <hongjiu.lu@intel.com> 2011-07-26 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/demangle-expected: Remove an extra line. * testsuite/demangle-expected: Remove an extra line.
@ -576,7 +586,7 @@
2009-05-29 Kai Tietz <kai.tietz@onevision.com> 2009-05-29 Kai Tietz <kai.tietz@onevision.com>
* pex-win32.c (pex_win32_fdopenr): Set INHERIT to false. * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
2009-05-29 Michael Matz <matz@suse.de> 2009-05-29 Michael Matz <matz@suse.de>
@ -607,7 +617,7 @@
2009-04-29 Julian Brown <julian@codesourcery.com> 2009-04-29 Julian Brown <julian@codesourcery.com>
* pex-win32.c (pex_win32_pipe): Add _O_NOINHERIT. * pex-win32.c (pex_win32_pipe): Add _O_NOINHERIT.
(pex_win32_exec_child): Ensure each process has only one handle open (pex_win32_exec_child): Ensure each process has only one handle open
on pipe endpoints. Close standard input after creating child for on pipe endpoints. Close standard input after creating child for
symmetry with standard output/standard error. symmetry with standard output/standard error.
@ -625,22 +635,22 @@
section, so that the native build does detect them at configure section, so that the native build does detect them at configure
time. time.
* configure: Regenerated. * configure: Regenerated.
2009-04-13 Ozkan Sezer <sezeroz@gmail.com> 2009-04-13 Ozkan Sezer <sezeroz@gmail.com>
PR target/39397 PR target/39397
* pex-common.h (struct pex_obj): Store pid values as pid_t, * pex-common.h (struct pex_obj): Store pid values as pid_t,
not as long (members *children and (*wait)) not as long (members *children and (*wait))
* pex-common.c (pex_run_in_environment): Likewise. * pex-common.c (pex_run_in_environment): Likewise.
* pex-win32.c (pex_win32_wait): Return pid_t and properly check * pex-win32.c (pex_win32_wait): Return pid_t and properly check
returned pid value. returned pid value.
* pex-djgpp.c (pex_djgpp_wait): Return pid_t. * pex-djgpp.c (pex_djgpp_wait): Return pid_t.
* pex-msdos.c (pex_msdos_wait): Likewise. * pex-msdos.c (pex_msdos_wait): Likewise.
2009-04-07 Arnaud Patard <apatard@mandriva.com> 2009-04-07 Arnaud Patard <apatard@mandriva.com>
* libiberty/configure.ac: Fix Linux/MIPS matching rule. * libiberty/configure.ac: Fix Linux/MIPS matching rule.
* libiberty/configure: Regenerate. * libiberty/configure: Regenerate.
2009-03-27 Ian Lance Taylor <iant@google.com> 2009-03-27 Ian Lance Taylor <iant@google.com>
@ -725,7 +735,7 @@
2008-10-08 David Edelsohn <edelsohn@gnu.org> 2008-10-08 David Edelsohn <edelsohn@gnu.org>
* xstrdup.c: Include <sys/types.h> after "config.h" * xstrdup.c: Include <sys/types.h> after "config.h"
2008-10-07 Jan Kratochvil <jan.kratochvil@redhat.com> 2008-10-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac: Call AC_SYS_LARGEFILE. * configure.ac: Call AC_SYS_LARGEFILE.

View File

@ -1280,6 +1280,7 @@ d_nested_name (struct d_info *di)
/* <prefix> ::= <prefix> <unqualified-name> /* <prefix> ::= <prefix> <unqualified-name>
::= <template-prefix> <template-args> ::= <template-prefix> <template-args>
::= <template-param> ::= <template-param>
::= <decltype>
::= ::=
::= <substitution> ::= <substitution>
@ -1308,10 +1309,19 @@ d_prefix (struct d_info *di)
<template-param> here. */ <template-param> here. */
comb_type = DEMANGLE_COMPONENT_QUAL_NAME; comb_type = DEMANGLE_COMPONENT_QUAL_NAME;
if (IS_DIGIT (peek) if (peek == 'D')
{
char peek2 = d_peek_next_char (di);
if (peek2 == 'T' || peek2 == 't')
/* Decltype. */
dc = cplus_demangle_type (di);
else
/* Destructor name. */
dc = d_unqualified_name (di);
}
else if (IS_DIGIT (peek)
|| IS_LOWER (peek) || IS_LOWER (peek)
|| peek == 'C' || peek == 'C'
|| peek == 'D'
|| peek == 'U' || peek == 'U'
|| peek == 'L') || peek == 'L')
dc = d_unqualified_name (di); dc = d_unqualified_name (di);

View File

@ -3901,6 +3901,10 @@ java resource java/util/iso4217.properties
--format=gnu-v3 --format=gnu-v3
_Z3addIidEDTplfp_fp0_ET_T0_ _Z3addIidEDTplfp_fp0_ET_T0_
decltype ({parm#1}+{parm#2}) add<int, double>(int, double) decltype ({parm#1}+{parm#2}) add<int, double>(int, double)
# decltype scope test
--format=gnu-v3
_Z1fI1SENDtfp_E4typeET_
decltype ({parm#1})::type f<S>(S)
# decltype/fn call test # decltype/fn call test
--format=gnu-v3 --format=gnu-v3
_Z4add3IidEDTclL_Z1gEfp_fp0_EET_T0_ _Z4add3IidEDTclL_Z1gEfp_fp0_EET_T0_

View File

@ -189,7 +189,7 @@ writeout_test (int test, const char * test_data)
{ {
char filename[256]; char filename[256];
FILE *fd; FILE *fd;
size_t len; size_t len, sys_fwrite;
char * parse; char * parse;
/* Unique filename per test */ /* Unique filename per test */
@ -208,7 +208,10 @@ writeout_test (int test, const char * test_data)
/* Run all possible replaces */ /* Run all possible replaces */
run_replaces (parse); run_replaces (parse);
fwrite (parse, len, sizeof (char), fd); sys_fwrite = fwrite (parse, sizeof (char), len, fd);
if (sys_fwrite != len)
fatal_error (__LINE__, "Failed to write to test file.", errno);
free (parse); free (parse);
fclose (fd); fclose (fd);
} }