Broken missing prototypes warning in ObjC?

  • Hi,

      I just encountered a strange problem: I tried to turn on all
    warnings in one of my Cocoa projects, and I also turned on the
    warning about missing function prototypes (not method, function).
    Trouble is, now I get error messages for some functions where I
    *know* that there are prototypes for them. I've tried everything to
    get rid of these erroneous warnings. I copied the signature of the
    function right above the implementation, put a semicolon after it,
    and I still get the warning.

      Has anyone experienced that? I tried it on several Macs at work and
    it happens everywhere there, but only in .m files, not in .c or .cpp
    files. It happens in a fresh Objective C project, even.

      Has anyone heard of this before, or more importantly, found a fix
    for this? It's a rather important warning, and I have a bunch of C
    code that would really benefit from this warning. Alternately, does
    anyone know whether there's a #pragma or so with which I can turn off
    this warning in my ObjC files, so I can still leave it on for the C
    and C++ code?

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
  • On 05.09.2007, at 17:48, Uli Kusterer wrote:
    > I just encountered a strange problem: I tried to turn on all
    > warnings in one of my Cocoa projects, and I also turned on the
    > warning about missing function prototypes (not method, function).
    > Trouble is, now I get error messages for some functions where I
    > *know* that there are prototypes for them. I've tried everything to
    > get rid of these erroneous warnings. I copied the signature of the
    > function right above the implementation, put a semicolon after it,
    > and I still get the warning.
    >
    > Has anyone experienced that? I tried it on several Macs at work and
    > it happens everywhere there, but only in .m files, not in .c or .cpp
    > files. It happens in a fresh Objective C project, even.
    >
    > Has anyone heard of this before, or more importantly, found a fix
    > for this? It's a rather important warning, and I have a bunch of C
    > code that would really benefit from this warning. Alternately, does
    > anyone know whether there's a #pragma or so with which I can turn
    > off this warning in my ObjC files, so I can still leave it on for
    > the C and C++ code?

    For future reference, I found the solution and did a short blog
    posting about it:

    <http://zathras.de/blog-ulis-09-01-pm-law.htm>

    Cheers,
    -- M. Uli Kusterer
    "The Witnesses of TeachText are everywhere..."
    http://www.zathras.de
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today