This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24512] New: [gomp] Bogus error message about redeclared variables
- 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: 25 Oct 2005 00:37:21 -0000
- Subject: [Bug c++/24512] New: [gomp] Bogus error message about redeclared variables
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following valid code snippet is rejected when compiled with -fopenmp:
=============================================
template<int> void foo()
{
#pragma omp for
for (int i=0; i<10; i++) ;
#pragma omp for
for (int i=0; i<10; i++) ;
}
void bar()
{
foo<0>();
}
=============================================
bug.cc: In function 'void foo() [with int <anonymous> = 0]':
bug.cc:12: instantiated from here
bug.cc:7: error: redeclaration of 'int i'
bug.cc:4: error: 'int i' previously declared here
--
Summary: [gomp] Bogus error message about redeclared variables
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=24512