How to find deprecated methods

  • Does anyone know how I can find the use of deprecated methods in my
    source? I thought gcc would warn about that (at least, that's what the
    docs say), but in practice it doesn't. Does gcc only warn when some
    warnign flag is set? In the gcc documentation I can only find a flag
    to /disable/ the warning (which is definitely not set in my xcode
    project).

    thanks,
    Christiaan
  • On Jan 23, 2009, at 11:19 AM, Christiaan Hofman wrote:

    > Does anyone know how I can find the use of deprecated methods in my
    > source? I thought gcc would warn about that (at least, that's what
    > the docs say), but in practice it doesn't.

    It does, if you ask nicely.

    > Does gcc only warn when some warnign flag is set?

    Yes.

    > In the gcc documentation I can only find a flag to /disable/ the
    > warning (which is definitely not set in my xcode project).

    In Xcode, open your project's (or target's) Info window and select the
    Build tab.  Start typing "deprecated" and by the time you have typed
    the 2nd "e", all should be obvious.  Check the checkbox and off you go.
  • On 23 Jan 2009, at 7:40 PM, Randall Meadows wrote:

    > On Jan 23, 2009, at 11:19 AM, Christiaan Hofman wrote:
    >
    >> Does anyone know how I can find the use of deprecated methods in my
    >> source? I thought gcc would warn about that (at least, that's what
    >> the docs say), but in practice it doesn't.
    >
    >
    > It does, if you ask nicely.
    >
    >> Does gcc only warn when some warnign flag is set?
    >
    > Yes.
    >
    >> In the gcc documentation I can only find a flag to /disable/ the
    >> warning (which is definitely not set in my xcode project).
    >
    > In Xcode, open your project's (or target's) Info window and select
    > the Build tab.  Start typing "deprecated" and by the time you have
    > typed the 2nd "e", all should be obvious.  Check the checkbox and
    > off you go.

    Well, yes, there is only one, and it IS checked.

    Christiaan
  • On 24/01/2009, at 8:20 AM, Christiaan Hofman wrote:

    >> In Xcode, open your project's (or target's) Info window and select
    >> the Build tab.  Start typing "deprecated" and by the time you have
    >> typed the 2nd "e", all should be obvious.  Check the checkbox and
    >> off you go.
    >
    > Well, yes, there is only one, and it IS checked.

    Have you done a clean so that all your files get re-compiled?

    --
    Rob Keniger
  • On 24 Jan 2009, at 12:41 AM, Rob Keniger wrote:

    > On 24/01/2009, at 8:20 AM, Christiaan Hofman wrote:
    >
    >>> In Xcode, open your project's (or target's) Info window and select
    >>> the Build tab.  Start typing "deprecated" and by the time you have
    >>> typed the 2nd "e", all should be obvious.  Check the checkbox and
    >>> off you go.
    >>
    >> Well, yes, there is only one, and it IS checked.
    >
    >
    > Have you done a clean so that all your files get re-compiled?
    >
    > --
    > Rob Keniger
    >

    Yes and no. No, I did not do a clean today, but yes, I have done a
    clean at some time in the past, and this setting has never been
    different from what it's now. Moreover I have explicitly compiled a
    (single) file that I know contains a deprecated method.

    Christiaan
  • On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:

    > Yes and no. No, I did not do a clean today, but yes, I have done a
    > clean at some time in the past, and this setting has never been
    > different from what it's now. Moreover I have explicitly compiled a
    > (single) file that I know contains a deprecated method.

    Is it marked as deprecated in the SDK you're compiling against?  ISTR
    that makes a difference.

    --
    adam
  • On 24 Jan 2009, at 1:08 AM, Adam R. Maxwell wrote:

    > On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:
    >
    >> Yes and no. No, I did not do a clean today, but yes, I have done a
    >> clean at some time in the past, and this setting has never been
    >> different from what it's now. Moreover I have explicitly compiled a
    >> (single) file that I know contains a deprecated method.
    >
    > Is it marked as deprecated in the SDK you're compiling against?
    > ISTR that makes a difference.
    >
    > --
    > adam
    >

    Of course. It's even marked deprecated in the deployment target, which
    is even lower.

    Christiaan
  • On Jan 24, 2009, at 1:12 AM, Christiaan Hofman wrote:

    >
    > On 24 Jan 2009, at 1:08 AM, Adam R. Maxwell wrote:
    >
    >> On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:
    >>
    >>> Yes and no. No, I did not do a clean today, but yes, I have done a
    >>> clean at some time in the past, and this setting has never been
    >>> different from what it's now. Moreover I have explicitly compiled
    >>> a (single) file that I know contains a deprecated method.
    >>
    >> Is it marked as deprecated in the SDK you're compiling against?
    >> ISTR that makes a difference.
    >>
    >> --
    >> adam
    >>
    >
    > Of course. It's even marked deprecated in the deployment target,
    > which is even lower.

    Deployment target is actually the setting I was thinking of.  This
    works for me, so try looking at the preprocessed source in Xcode to
    see if __attribute__((deprecated)) shows up where you think it should.
  • On 24 Jan 2009, at 1:26 AM, Adam R. Maxwell wrote:

    >
    > On Jan 24, 2009, at 1:12 AM, Christiaan Hofman wrote:
    >
    >>
    >> On 24 Jan 2009, at 1:08 AM, Adam R. Maxwell wrote:
    >>
    >>> On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:
    >>>
    >>>> Yes and no. No, I did not do a clean today, but yes, I have done
    >>>> a clean at some time in the past, and this setting has never been
    >>>> different from what it's now. Moreover I have explicitly compiled
    >>>> a (single) file that I know contains a deprecated method.
    >>>
    >>> Is it marked as deprecated in the SDK you're compiling against?
    >>> ISTR that makes a difference.
    >>>
    >>> --
    >>> adam
    >>>
    >>
    >> Of course. It's even marked deprecated in the deployment target,
    >> which is even lower.
    >
    > Deployment target is actually the setting I was thinking of.  This
    > works for me, so try looking at the preprocessed source in Xcode to
    > see if __attribute__((deprecated)) shows up where you think it should.

    I'm not sure I understand you. Where should I look?

    Christiaan
  • On Jan 24, 2009, at 1:37 AM, Christiaan Hofman wrote:

    >
    > On 24 Jan 2009, at 1:26 AM, Adam R. Maxwell wrote:
    >
    >>
    >> On Jan 24, 2009, at 1:12 AM, Christiaan Hofman wrote:
    >>
    >>>
    >>> On 24 Jan 2009, at 1:08 AM, Adam R. Maxwell wrote:
    >>>
    >>>> On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:
    >>>>
    >>>>> Yes and no. No, I did not do a clean today, but yes, I have done
    >>>>> a clean at some time in the past, and this setting has never
    >>>>> been different from what it's now. Moreover I have explicitly
    >>>>> compiled a (single) file that I know contains a deprecated method.
    >>>>
    >>>> Is it marked as deprecated in the SDK you're compiling against?
    >>>> ISTR that makes a difference.
    >>>>
    >>>> --
    >>>> adam
    >>>>
    >>>
    >>> Of course. It's even marked deprecated in the deployment target,
    >>> which is even lower.
    >>
    >> Deployment target is actually the setting I was thinking of.  This
    >> works for me, so try looking at the preprocessed source in Xcode to
    >> see if __attribute__((deprecated)) shows up where you think it
    >> should.
    >
    >
    > I'm not sure I understand you. Where should I look?

    Open up a source file.  Control-click in the textview, and choose
    "Preprocess" from the context menu.
  • On 24 Jan 2009, at 1:39 AM, Adam R. Maxwell wrote:

    >
    > On Jan 24, 2009, at 1:37 AM, Christiaan Hofman wrote:
    >
    >>
    >> On 24 Jan 2009, at 1:26 AM, Adam R. Maxwell wrote:
    >>
    >>>
    >>> On Jan 24, 2009, at 1:12 AM, Christiaan Hofman wrote:
    >>>
    >>>>
    >>>> On 24 Jan 2009, at 1:08 AM, Adam R. Maxwell wrote:
    >>>>
    >>>>> On Jan 24, 2009, at 12:47 AM, Christiaan Hofman wrote:
    >>>>>
    >>>>>> Yes and no. No, I did not do a clean today, but yes, I have
    >>>>>> done a clean at some time in the past, and this setting has
    >>>>>> never been different from what it's now. Moreover I have
    >>>>>> explicitly compiled a (single) file that I know contains a
    >>>>>> deprecated method.
    >>>>>
    >>>>> Is it marked as deprecated in the SDK you're compiling against?
    >>>>> ISTR that makes a difference.
    >>>>>
    >>>>> --
    >>>>> adam
    >>>>>
    >>>>
    >>>> Of course. It's even marked deprecated in the deployment target,
    >>>> which is even lower.
    >>>
    >>> Deployment target is actually the setting I was thinking of.  This
    >>> works for me, so try looking at the preprocessed source in Xcode
    >>> to see if __attribute__((deprecated)) shows up where you think it
    >>> should.
    >>
    >>
    >> I'm not sure I understand you. Where should I look?
    >
    > Open up a source file.  Control-click in the textview, and choose
    > "Preprocess" from the context menu.
    >

    Thanks, I did not know that feature. Anyway, I see the deprecated
    attributed behind the particular method name in a copy of the header
    interface in which it occurs. So I'm still lost why it doesn't warn.

    Christiaan
previous month january 2009 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 31  
Go to today