This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24502] New: [gomp] for loop inside template rejected
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2005 11:10:53 -0000
- Subject: [Bug c++/24502] New: [gomp] for loop inside template rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following valid code snippet is rejected by the C++ frontend when
compiled with -fopenmp:
=================================
template<typename> void foo()
{
int i;
#pragma omp for
for (i = 0; i < 10; i++) ;
}
=================================
bug.cc: In function 'void foo()':
bug.cc:5: error: expected iteration declaration or initialization
It works without the template or if I declare "i" inside the for loop.
--
Summary: [gomp] for loop inside template rejected
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: rejects-valid, openmp
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24502