Go to file
Jason Merrill 852497a31e Implement return type deduction for normal functions with -std=c++1y.
* cp-tree.h (FNDECL_USED_AUTO): New macro.
	(LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
	(dependent_lambda_return_type_node): Remove.
	(CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
	(struct language_function): Add x_auto_return_pattern field.
	(current_function_auto_return_pattern): New.
	(enum tsubst_flags): Add tf_partial.
	* decl.c (decls_match): Handle auto return comparison.
	(duplicate_decls): Adjust error message for auto return.
	(cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
	(cp_finish_decl): Don't do auto deduction for functions.
	(grokdeclarator): Allow auto return without trailing return type in
	C++1y mode.
	(check_function_type): Defer checking of deduced return type.
	(start_preparsed_function): Set current_function_auto_return_pattern.
	(finish_function): Set deduced return type to void if not previously
	deduced.
	* decl2.c (change_return_type): Handle error_mark_node.
	(mark_used): Always instantiate functions with deduced return type.
	Complain about use if deduction isn't done.
	* parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
	initial return type.
	(cp_parser_lambda_body): Don't deduce return type in a template.
	(cp_parser_conversion_type_id): Allow auto in C++1y.
	* pt.c (instantiate_class_template_1): Don't mess with
	LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
	(tsubst_copy_and_build): Likewise.
	(fn_type_unification, tsubst): Don't reduce the template parm level
	of 'auto' during deduction.
	(unify): Compare 'auto' specially.
	(get_bindings): Change test.
	(always_instantiate_p): Always instantiate functions with deduced
	return type.
	(do_auto_deduction): Handle error_mark_node and lambda context.
	Don't check for use in initializer.
	(contains_auto_r): Remove.
	* search.c (lookup_conversions_r): Handle auto conversion function.
	* semantics.c (lambda_return_type): Handle null return.  Don't mess
	with dependent_lambda_return_type_node.
	(apply_deduced_return_type): Rename from apply_lambda_return_type.
	* typeck.c (merge_types): Handle auto.
	(check_return_expr): Do auto deduction.
	* typeck2.c (add_exception_specifier): Fix complain check.

From-SVN: r185768
2012-03-24 16:56:08 -04:00
boehm-gc
config
contrib
fixincludes inclhack.def (aix_malloc): New. 2012-03-23 19:55:01 -04:00
gcc Implement return type deduction for normal functions with -std=c++1y. 2012-03-24 16:56:08 -04:00
gnattools
include
INSTALL
intl
libada
libcpp * lex.c (search_line_fast): Provide Neon-optimized version for ARM. 2012-03-22 17:54:55 +00:00
libdecnumber
libffi Add missing ChangeLog entry from 2012-03-09 commit. 2012-03-17 20:45:24 -04:00
libgcc lib1funcs.asm (ctzsi2): New function. 2012-03-22 15:14:46 +00:00
libgfortran PR libfortran/52608 Move the removal of initial zeros. 2012-03-17 19:19:49 +02:00
libgo syscall: Fix errno handling in syscall.Syscall and friends. 2012-03-23 18:41:07 +00:00
libgomp re PR middle-end/52547 (ICE with openmp with nested function which requires a trampoline) 2012-03-22 20:25:36 +01:00
libiberty mangle.c (write_type): Handle 'auto'. 2012-03-21 00:04:39 -04:00
libitm lib{gomp,itm}/testsuite: load missing fortran-modules.exp 2012-03-16 10:51:06 +01:00
libjava Merge GNU Classpath 0.99 into libjava. 2012-03-23 15:19:26 +00:00
libmudflap
libobjc
libquadmath
libssp
libstdc++-v3 Update sparc-linux-gnu libstdc++ ABI baseline. 2012-03-23 11:29:39 -07:00
lto-plugin
maintainer-scripts crontab: Enable snapshots from gcc-4_7-branch. 2012-03-22 09:25:49 +00:00
zlib
ABOUT-NLS
ChangeLog
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.