Skip to content

Parse error (state 296) at <name>: __niter #10

Description

@sigmike

Hello,

I get this error in a STL header:

In state 296, I expected one of these tokens:
  (, ), [, ], ->, ., +, -, ++, --, &, *, .*, ->*, /, %, <<, >>, <, <=, >, >=, ==, !=, ^, |, &&, ||, ?, :, =, *=, /=, %=, +=, -=, &=, ^=, |=, <<=, >>=, ,, ..., ;, }, __attribute__, <?, >?, 
/usr/include/c++/4.6/bits/stl_algobase.h:731:32: Parse error (state 296) at <name>: __niter

I've reduced the input with delta to this:

namespace std __attribute__ ((__visibility__ ("default"))) {
  template<class _Sp, class _Tp> struct __traitor {};
  template<typename _Tp> struct __is_integer {};
  template<typename _Tp> struct __is_floating {};
  template<typename _Tp> struct __is_pointer {};
  template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > {};
  template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > {};
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
  template<bool, typename> struct __enable_if {};
}
namespace std __attribute__ ((__visibility__ ("default"))) {
  template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) {
    for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first)
      *__first = __value;
  }

I'm using gcc 4.6.3 and oink master with the lattice config on an clean Ubuntu 12.04. The header comes from the libstdc++6-4.6-dev package.

Edit: Ubuntu 12.04 instead of 14.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions