[bind10-dev] coding guidelines

Francis Dupont fdupont at isc.org
Wed Oct 17 08:06:39 UTC 2012


> > => the concern I have about " " is it doesn't say to ignore the -I
> > paths, it just changes the order to search is done. More, this order
> > change is compiler dependent, e.g., gcc and msvc don't use the same!
> > And the C11 standard says if the " " specific search fails the include
> > must be interpreted as with < >, so there is no way to "protect" a
> > " " include.
> 
> Can you show a specific example of trouble due to the difference
> between gcc and msvc

=> hopefully there is none (as I said I shan't object if the local
directory first is assumed) but any misconception can lead to bad/
unexpected consequences

or the statement from C++11?

=> From N1570 (the last C11 draft):

2 A preprocessing directive of the form
    # include <h-char-sequence> new-line
  searches a sequence of implementation-defined places for a header
  identified uniquely by the specified sequence between the < and >
  delimiters, and causes the replacement of that directive by the
  entire contents of the header. How the places are specified or the
  header identified is implementation-defined.

3 A preprocessing directive of the form
    # include "q-char-sequence" new-line
  causes the replacement of that directive by the entire contents of
  the source file identified by the specified sequence between the "
  delimiters. The named source file is searched for in an
  implementation-defined manner. If this search is not supported, or
  if the search fails, the directive is reprocessed as if it read
    # include <h-char-sequence> new-line
  with the identical contained sequence (including > characters, if
  any) from the original directive.

I didn't look at the C++11 spec but there is no reason for C++ to be
different on this point. (PS: just checked: the text is the same, i.e.,
implementation-defined).

Regards

Francis Dupont <fdupont at isc.org>

PS: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf


More information about the bind10-dev mailing list