Subject: Issue MI01 Include Files: Reworded Proposal
From: Per Bojsen (bojsen@zaiqtech.com)
Date: Wed Oct 15 2003 - 08:35:19 PDT
Hi,
here is the new wording of the MI01 Include Files proposal according to
the feedback from the ITC meeting on 10/9/03:
The C++ and C APIs shall be declared in a header file with the name
scemi.h
Note, the name is all-lowercase, and the same for both APIs.
On the issue of whether to mandate <> or "" style inclusion, I looked in
to the C standard and it states that the "" style is a strict superset
of the <> in terms of where it looks for a header. However, the places
it may look for headers are implementation defined in both cases. I need
to confirm this is true for C++ as well.
Now, in UNIX there is a commonly accepted convention that <> style
inclusion causes a search in system directories and "" style causes
the compiler to look in the directory of the including file (*not* the
directory from which the compiler was launched) and if not found there
it will search as if the <> style was used. So the only difference
between <> style and "" style is that in the latter one more directory,
namely the directory of the including file, is searched. Further, the
user can prepend to the <> search path (and by implication the "" path)
by using the -I option. All this is true for gcc/g++ (see
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/cpp/Include-Syntax.html#Include%20Sy
ntax).
This is also true for the Sun compiler according to the Sun cpp man
page.
Given that the "" style only adds the directory containing the including
file to the search path it does not make sense to say the scemi.h header
file must be included using "". The user will have to add -I options
pointing to the SCE-MI installation directory anyway. Also, "" style
is intended for the user's own application specific header files. SCE-MI
is properly thought of as a library.
Hence I maintain that in any code examples we show, the scemi.h header
should be included like this:
#include <scemi.h>
I don't think we need to actually specify anything regarding whether ""
or <> should be used, though. It would be really hard for a SCE-MI
implementation to prevent a user from using either "" or <> in their
code since the interpretation of these are really up to the compiler.
Per
-- Per Bojsen Email: <bojsen@zaiqtech.com> Zaiq Technologies, Inc. WWW: http://www.zaiqtech.com 78 Dragon Ct. Tel: 781 721 8229 Woburn, MA 01801 Fax: 781 932 7488
This archive was generated by hypermail 2b28 : Wed Oct 15 2003 - 08:35:16 PDT