Skip to main content
deleted 1 character in body
Source Link
gberth
  • 744
  • 8
  • 18

Is there a compiler attributes (clang / gcc) that does something like noreturn but for loop?

Something like:

__atribute__((loopsnoreturn)) for (int i=0; i<12; <i++i++)
{
    if(i==5) return 0; //< Compiler error
}

Is there a compiler attributes (clang / gcc) that does something like noreturn but for loop?

Something like:

__atribute__((loopsnoreturn)) for (int i=0; i<12; <i++)
{
    if(i==5) return 0; //< Compiler error
}

Is there a compiler attributes (clang / gcc) that does something like noreturn but for loop?

Something like:

__atribute__((loopsnoreturn)) for (int i=0; i<12; i++)
{
    if(i==5) return 0; //< Compiler error
}
Source Link
gberth
  • 744
  • 8
  • 18

Using __atribute__((noreturn)) on loops?

Is there a compiler attributes (clang / gcc) that does something like noreturn but for loop?

Something like:

__atribute__((loopsnoreturn)) for (int i=0; i<12; <i++)
{
    if(i==5) return 0; //< Compiler error
}