[cfe-dev] Pragma message in Clang?

Matt Joiner anacrolix at gmail.com
Sun Sep 26 05:25:20 PDT 2010


It does, enabling it however seems to drop recognition (I assume C99
is out the window) of _Bool:

./cpfs.h(27) :  error: unknown type name '_Bool'

subprocess.CalledProcessError: Command '['clang', '-c', 'bitmap.c',
'-o', '/tmp/bitmap.c.o.mbECeS', '-fms-extensions', '-Winline',
'-Wshadow', '-Wextra', '-Wmissing-format-attribute', '-Wall',
'-Wfloat-equal', '-fdiagnostics-show-option',
'-Werror-implicit-function-declaration', '-Werror=return-type',
'-fno-exceptions', '-std=gnu99', '-D_GNU_SOURCE',
'-D_FILE_OFFSET_BITS=64', '-DCPFS_SIMD_ALIGNED', '-DCPFS_USE_SSSE3',
'-DFUSE_USE_VERSION=28', '-O3', '-g', '-DNDEBUG',
'-DCPFS_LOG_LEVEL=WARNING']' returned non-zero exit status 1

I don't imagine this is intentional, or -fms-extensions is sneakily
switching language to C++, or clobbering the C standard in use.

On Sun, Sep 26, 2010 at 9:50 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
> clang implements #pragma message but it is currently only enabled in
> Microsoft mode (-fms-extensions).
>
> Since GCC also support it, it would make sense to enable it by default.
>
> On Sun, Sep 26, 2010 at 7:37 AM, Matt Joiner <anacrolix at gmail.com> wrote:
>> What's Clang's equivalent to `#pragma message` as used in [GCC][1] and
>> [MSVC][2]?
>>
>>  [1]: http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
>>  [2]: http://msdn.microsoft.com/en-us/library/x7dkzch2.aspx
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>




More information about the cfe-dev mailing list