blob: 423e6d065a89091d5897d3c84c4ab447b7a50f2a [file] [log] [blame]
Michael J. Spencer301669b2010-09-27 06:19:02 +00001/* Test pragma message directive from
2 http://msdn.microsoft.com/en-us/library/x7dkzch2.aspx */
3
4// message: Sends a string literal to the standard output without terminating
5// the compilation.
6// #pragma message(messagestring)
7// OR
8// #pragma message messagestring
9//
10// RUN: %clang_cc1 -fsyntax-only -verify %s
11#define STRING2(x) #x
12#define STRING(x) STRING2(x)
13#pragma message(":O I'm a message! " STRING(__LINE__)) // expected-warning {{:O I'm a message! 13}}
14#pragma message ":O gcc accepts this! " STRING(__LINE__) // expected-warning {{:O gcc accepts this! 14}}