#pragma mark in sources

hello lldb developers ++

i like to reduce warnings where possible so that when they do appear, they are meaningful.

in compiling lldb for windows, there are a lot of warnings about #pragma mark, which is not recognized by gcc 4.2.5 for mingw.

i know in the past, for cross-platform work, the habit was to wrap these something like:

#if defined(APPLE)
#pragma mark
#endif

or even further

#ifdef USES_PRAGMA_MARK
#pragma mark
#endif

which, of course, means #defining pragma mark on the (virtual) command line or in a precompiled header for the project.

i don’t care how exactly we do this, but i would like to have something to silence the slew of warnings when not compiling under xcode.

++ kirk beitz : nokia : austin + san diego : kirk.beitz@nokia.com ++

<kirk.beitz@nokia.com> writes:

hello lldb developers ++

i like to reduce warnings where possible so that when they do appear, they are meaningful.

in compiling lldb for windows, there are a lot of warnings about #pragma mark, which is not recognized by gcc 4.2.5 for mingw.

i know in the past, for cross-platform work, the habit was to wrap these something like:

#if defined(__APPLE__)
#pragma mark
#endif

or even further

#ifdef USES_PRAGMA_MARK
#pragma mark
#endif

which, of course, means #defining pragma mark on the (virtual) command line or in a precompiled header for the project.

i don't care how exactly we do this, but i would like to have something to silence the slew of warnings when not compiling under xcode.

In the makefiles we use -Wno-unknown-pragmas for the express purpose of
silencing warnings about #pragma mark.

that’s acceptable. i’ll set that on the command line. thanks.
++ kirk

and with that said, i did notice in a couple of files (NSXMLNode.h, NSXMLElement.h, NSXMLDTD.h) the existing LLDB practice of using

#if 0
#pragma mark
#endif

just in case there’s any desire to go with an in-source solution.

but i’m happy with setting the command line arg in makefiles (or as i’m doing now trying to work this out on windows, in eclipse command-line settings).

++ kirk beitz : nokia : austin + san diego : kirk.beitz@nokia.com ++