Go to file
David Malcolm 5da1234bb7 C++: don't offer bogus "._0" suggestions (PR c++/86329)
PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:

#include <string>

int compare()
{
  return __n1 - __n2;
}

suggested.cc: In function 'int compare()':
suggested.cc:5:10: error: '__n1' was not declared in this scope
   return __n1 - __n2;
          ^~~~
suggested.cc:5:10: note: suggested alternative: '._61'
   return __n1 - __n2;
          ^~~~
          ._61
suggested.cc:5:17: error: '__n2' was not declared in this scope
   return __n1 - __n2;
                 ^~~~
suggested.cc:5:17: note: suggested alternative: '._72'
   return __n1 - __n2;
                 ^~~~
                 ._72

The dot-prefixed names are an implementation detail of how we implement
anonymous enums found in the header files, generated via
anon_aggrname_format in make_anon_name.

This patch uses anon_aggrname_p to filter them out when considering
which names to suggest.

gcc/cp/ChangeLog:
	PR c++/86329
	* name-lookup.c (consider_binding_level): Filter out names that
	match anon_aggrname_p.

gcc/testsuite/ChangeLog:
	PR c++/86329
	* g++.dg/lookup/pr86329.C: New test.

From-SVN: r262199
2018-06-27 23:21:46 +00:00
config
contrib Improve gimple.vim syntax file. 2018-06-19 12:46:26 +00:00
fixincludes fixincludes: Add missing hunk to tests/base/ioLib.h 2018-06-27 07:59:23 +00:00
gcc C++: don't offer bogus "._0" suggestions (PR c++/86329) 2018-06-27 23:21:46 +00:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic [ARM] Use __ARM_ARCH and __ARM_FEATURE_LDREX instead of __ARM_ARCH__ 2018-06-21 13:05:36 +02:00
libbacktrace re PR other/86198 (Libbacktrace does not properly work with ".note.gnu.build-id" section) 2018-06-21 08:42:53 +03:00
libcc1
libcpp
libdecnumber
libffi
libgcc Fix typo in libgcc/Makefile.in 2018-06-27 20:32:27 +00:00
libgfortran
libgo runtime: use #ifdef instead of #if for USING_SPLIT_STACK 2018-06-23 02:44:36 +00:00
libgomp re PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least 5 nested loops) 2018-06-26 12:40:50 +02:00
libhsail-rt
libiberty
libitm
libobjc
liboffloadmic
libquadmath
libsanitizer re PR sanitizer/86090 ([ASAN] ASAN does not properly configure libbacktrace.) 2018-06-13 22:51:42 +03:00
libssp
libstdc++-v3 stl_vector.h (struct _Vector_base<>::_Vector_impl_data): New. 2018-06-27 20:23:20 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib Allow building of the zlib component when the building takes place in the source directory. 2018-06-19 11:49:08 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog Add myself to MAINTAINERS file 2018-06-26 08:58:18 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess config.guess: Import latest version. 2018-06-16 13:32:40 +10:00
config.rpath
config.sub config.guess: Import latest version. 2018-06-16 13:32:40 +10:00
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 Add myself to MAINTAINERS file 2018-06-26 08:58:18 +00:00
Makefile.def Makefile.def (fortran): Add check-target-libgomp-fortran. 2018-06-18 22:01:58 +00:00
Makefile.in Makefile.def (fortran): Add check-target-libgomp-fortran. 2018-06-18 22:01:58 +00:00
Makefile.tpl Makefile.def (fortran): Add check-target-libgomp-fortran. 2018-06-18 22:01:58 +00:00
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.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.