[Bug c++/83533] error: no type named 'X' in 'using = ...'

2017-12-24 Thread povelikin.rostislav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83533

--- Comment #3 from Rostislav Povelikin  
---
(In reply to Jonathan Wakely from comment #2)
> GCC 4.7.x has not been maintained or supported by the upstream GCC project
> for several years, and this is already fixed in GCC 4.8.0

Hi Jonathan,

Could you explain the nature of such bug? How to name it correctly?
The bug wasn't reproduced by myself on Fedora 23,24,25 with the same compiler
version.
Is it related to Debian?

Thanks

[Bug c++/83533] error: no type named 'X' in 'using = ...'

2017-12-21 Thread povelikin.rostislav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83533

--- Comment #1 from Rostislav Povelikin  
---
If I change aliasing of u with typedef instead of using - works fine.

[Bug c++/83533] New: error: no type named 'X' in 'using = ...'

2017-12-21 Thread povelikin.rostislav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83533

Bug ID: 83533
   Summary: error: no type named 'X' in 'using = ...'
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: povelikin.rostislav at gmail dot com
  Target Milestone: ---

Created attachment 42945
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42945=edit
Source code

Hi all,

Doesn't work with configuration described below. Works fine with other gcc
versions and other systems.

Source code in attached files.

Command line is:
gcc -v -save-temps a.cpp -std=c++11

Output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE a.cpp -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -o a.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.7
 /usr/include/c++/4.7/x86_64-linux-gnu
 /usr/include/c++/4.7/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1plus -fpreprocessed a.ii -quiet -dumpbase
a.cpp -mtune=generic -march=x86-64 -auxbase a -std=c++11 -version -o a.s
GNU C++ (Debian 4.7.2-5) version 4.7.2 (x86_64-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Debian 4.7.2-5) version 4.7.2 (x86_64-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 66d178dd81da8c975e003e06d9f5e782
a.cpp: In instantiation of ‘void foo() [with long unsigned int N = 3ul]’:
a.cpp:27:16:   required from here
a.cpp:20:23: error: no type named ‘d’ in ‘using u = struct internal::U<A<int,
N> >’



preprocessed source file:
# 1 "a.cpp"
# 1 ""
# 1 "a.cpp"
# 1 "/usr/include/c++/4.7/cstddef" 1 3
# 41 "/usr/include/c++/4.7/cstddef" 3

# 42 "/usr/include/c++/4.7/cstddef" 3

# 1 "/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h" 1 3
# 171 "/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h" 3
namespace std
{
  typedef long unsigned int size_t;
  typedef long int ptrdiff_t;


  typedef decltype(nullptr) nullptr_t;

}
# 414 "/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h" 3
# 1 "/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h" 1 3
# 40 "/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h" 3
# 1 "/usr/include/features.h" 1 3 4
# 323 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/predefs.h" 1 3 4
# 324 "/usr/include/features.h" 2 3 4
# 356 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
# 359 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 360 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
# 357 "/usr/include/features.h" 2 3 4
# 388 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4



# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 5 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4




# 1 "/usr/include/x86_64-li