Yes, there are at least two differences. In C++ (WG21 N4567 [cpp.include]/5):
The implementation shall provide unique mappings for sequences
consisting of one or more nondigits or digits (2.10) followed by a
period (.
) and a single nondigit. The first character shall not be
a digit. The implementation may ignore distinctions of alphabetical
case.
In C (WG14 N1570 6.10.2/5, emphasis mine):
The implementation shall provide unique mappings for sequences
consisting of one or more nondigits or digits (6.4.2.1) followed by a
period (.
) and a single nondigit. The first character shall not be a
digit. The implementation may ignore distinctions of alphabetical case
and restrict the mapping to eight significant characters before the
period.
A conforming C implementation can map "foobarbaz.h
" and "foobarbat.h
" to the same source file. A conforming C++ implementation cannot.
Additionally, in C (N1570 6.4.7):
If the characters '
, \
, "
, //
, or /*
occur in the sequence
between the <
and >
delimiters, the behavior is undefined.
Similarly, if the characters '
, \
, //
, or /*
occur in the
sequence between the "
delimiters, the behavior is undefined.
while in C++ (N4567 [lex.header]/2):
The appearance of either of the characters '
or \
or of either of
the character sequences /*
or //
in a q-char-sequence or an
h-char-sequence is conditionally-supported with implementation-defined semantics, as is the appearance of the
character "
in an h-char-sequence.
"conditionally-supported with implementation-defined semantics" means that
- if the implementation doesn't support it, it must issue a diagnostic;
- if the implementation does support it, its interpretation of this construct must be documented.
while "undefined behavior" means that the implementation can do whatever it wants.