[comp.lang.c++] #pragma ... spiegazione s'il vous plait.

tony@banana.cs.uq.oz (Tony O'Hagan) (01/23/89)

I've noticed the pre-processor directive "#pragma" mentioned in net news
and in my Zortech system as a reserved `word'.  It's doesn't appear to be
mentioned in the Stroustrup text or documented in the Zortech manual.
Can someone enlighten me on it's C++ meaning ?

	Thanks,
	Tony O'Hagan
-----------------------------------------------------------------------------
Tony O'Hagan	Phone: +61 7 223-2871  (soon to change)
Dept. of Compter Science, Queensland University of Technology,
Brisbane, AUSTRALIA 4067.
ACSnet: tony@uqcspe.oz		UUCP:	...!uunet!munnari!uqcspe.oz!tony
JANET:	uqcspe.oz!tony@ukc	ARPA:	tony%uqcspe.oz@uunet.uu.net

tony@banana.cs.uq.oz (Tony O'Hagan) (01/23/89)

I've noticed the pre-processor directive "#pragma" mentioned in net news
and in my Zortech system as a reserved `word'.  It's doesn't appear to be
mentioned in the Stroustrup text or documented in the Zortech manual.
Can someone enlighten me on it's C++ meaning ?

	Thanks,
	Tony O'Hagan
-----------------------------------------------------------------------------
Tony O'Hagan	Phone: +61 7 223-2871  (soon to change)
Dept. of Compter Science, Queensland University of Technology,
2 George St., Brisbane, AUSTRALIA 4001.
ACSnet: tony@uqcspe.oz		UUCP:	...!uunet!munnari!uqcspe.oz!tony
JANET:	uqcspe.oz!tony@ukc	ARPA:	tony%uqcspe.oz@uunet.uu.net

bright@Data-IO.COM (Walter Bright) (01/26/89)

In article <2211@uqcspe.cs.uq.oz> tony@banana.cs.uq.oz (Tony O'Hagan) writes:
<I've noticed the pre-processor directive "#pragma" mentioned in net news
<and in my Zortech system as a reserved `word'.  It's doesn't appear to be
<mentioned in the Stroustrup text or documented in the Zortech manual.
<Can someone enlighten me on it's C++ meaning ?

Zortech C and C++ simply totally ignore #pragma lines. This is for
ANSI C compatibility. It also enables one to create source code that
can be compiled under other compilers that do support some pragmas, as in:

	#if BRAND_X_COMPILER
	#pragma brand x specific feature
	#elif BRAND_Y_COMPILER
	#pragma same feature only different syntax for brand y
	#endif

Whether the ANSI C idea of pragmas is going to be useful in practice
only time will tell. I'm sure C++ will follow the lead.