This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51934] FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) due to "cdecl attribute ignored" warning
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jan 2012 15:19:37 +0000
- Subject: [Bug target/51934] FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) due to "cdecl attribute ignored" warning
- Auto-submitted: auto-generated
- References: <bug-51934-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51934
--- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 15:19:37 UTC ---
> Well, if it hangs before the fix with the noreturn attribute, then it is
> trivial to replace the return a; with for (;;);
It does not hang:
macbook] f90/bug% cat pr51344_db.C
/* { dg-do compile } */
class A;
template <class T>
class B
{
friend __attribute__((noreturn)) A& operator >>(A& a, B& b)
{
for (;;);
/* return a; */
}
};
[macbook] f90/bug% time g++-fsf-4.6 -c pr51344_db.C
0.010u 0.015s 0:00.05 40.0% 0+0k 0+4io 0pf+0w
while
[macbook] f90/bug% cat pr51344_db.C
/* { dg-do compile } */
class A;
template <class T>
class B
{
friend __attribute__((format)) A& operator >>(A& a, B& b)
{
for (;;);
/* return a; */
}
};
macbook] f90/bug% time g++-fsf-4.6 -c pr51344_db.C
^C0.002u 0.005s 0:37.44 0.0% 0+0k 0+1io 0pf+0w
^
| interrupted