Sun Studio 12: C++ User's Guide

B.2.8 #pragma hdrstop

Embed the hdrstop pragma in your source-file headers to identify the end of the viable source prefix. For example, consider the following files:


example% cat a.cc
#include "a.h"
#include "b.h"
#include "c.h"
#include <stdio.h>
#include "d.h"
.
.
.
example% cat b.cc
#include "a.h"
#include "b.h"
#include "c.h"

The viable source prefix ends at c.h so you would insert a #pragma hdrstop after c.h in each file.

#pragma hdrstop must only appear at the end of the viable prefix of a source file that is specified with the CC command. Do not specify #pragma hdrstop in any include file.

See A.2.158 -xpch=v and A.2.159 -xpchstop=file.