This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38485] New: possible regression: expected primary-expression at end of input


Compressed .ii file goes as attachment.

gcc 4.3.2: (reports no errors)

my gcc:

g++ -c kded_kephal_automoc.ii

In file included from
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/moc_xmlconfigurations.cpp:11,
                 from
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/kded_kephal_automoc.cpp:6:
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/../../../../../kdebase-workspace-4.1.80/libs/kephal/configurations/xml/xmlconfigurations.h:104:
error: expected primary-expression at end of input

g++ -v

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../svn/configure --prefix=/usr --enable-threads
--enable-shared --enable-languages=c,c++ --host=x86_64-unknown-linux-gnu
--with-system-zlib --with-x --enable-java-awt=gtk
--enable-targets=x86_64-unknown-linux-gnu --with-arch=athlon64
--with-tune=athlon64 --with-cpu=athlon64 --disable-multilib
--enable-__cxa_atexit --enable-libada --enable-gtk-cairo
--enable-libgcj-multifile --with-long-double-128 --disable-nls
Thread model: posix
gcc version 4.4.0 20081211 (experimental) (GCC) 

The problem is at line 9355 of the .ii: (comment it out and it works)

void translateToOther(QMap<int, QRect> & layout, Output * base, QMap
<int, int> match = (QMap<int, int>()));

...and from what I could figure out, it is the right-side of the '=' default
parameter assignment.

>From my understanding, the code sould be equivalent to this small test case:

template <typename T1, typename T2> class blah {
        T1 whatever1;
        T2 whatever2;
        public:
        inline blah() {}
        inline T1 get1() { return whatever1; }
};

int foo(blah <int, int> bar = (blah <int, int> ())) {
        return bar.get1();
}

int main(void) {
        return foo();
}

However, this code compiles and runs perfectly on my gcc.


-- 
           Summary: possible regression: expected primary-expression at end
                    of input
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at spatium dot org
  GCC host triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]