New const function detection code and infinite loops.

Mark Mitchell mark@codesourcery.com
Mon Aug 23 09:09:00 GMT 1999


>>>>> "Jan" == Jan Hubicka <jhub6202@ss1000.ms.mff.cuni.cz> writes:

    Jan> My current implementation is to handle "pure" functions as
    Jan> const functions with one extra input parametter (memory). So
    Jan> function will get removed too.

But that's a bug.  This program is guaranteed not to call abort in
ANSI C:

  void f() {
    while (1);
  }

  int main () {
    f();
    abort ();
  }

I think we need to find a way to solve this problem.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc mailing list