ARM Technical Support Knowledge Articles

#DEFINE FOR #PRAGMA

Applies to: General Topics

Answer


Information in this article applies to:


SYMPTOMS

Why can't I use the #define preprocessor text substitution to make #pragma statements for the compiler?

CAUSE

#pragma and #define are both preprocessor statements and each requires its own separate line.

RESOLUTION

#pragma and #define statements must be on separate lines. The compiler generates an error if the following example is used:

#define asmbegin    #pragma asm
#define asmend      #pragma endasm

asmbegin
asmend

Article last edited on: 2004-05-01 16:24:13

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential