+ flagcode flg;
+
+ DPRINTF (("Okay...: %s", uentry_unparse (ue)));
+
+ if (uentry_isVisibleExternally (ue) && !uentry_isAnyTag (ue))
+ {
+ flg = FLG_ISORESERVED;
+ }
+ else
+ {
+ flg = FLG_ISORESERVEDLOCAL;
+ }
+
+ DPRINTF (("ue: %s", uentry_unparseFull (ue)));
+
+ /*
+ ** These restrictions only apply to identifiers with global linkage.
+ */
+
+ /*
+ ** 4.13.2 Character Handling <ctype.h>
+ **
+ ** Function names that begin with either "is" or "to" and a lowercase letter ...
+ */
+
+ if (((fchar == 'i' && schar == 's')
+ || (fchar == 't' && schar == 'o'))
+ && (islower ((int) tchar)))
+ {
+ hasError |= optgenerror2
+ (flg, FLG_NAMECHECKS,
+ message
+ ("Name %s is reserved for future library extensions. "
+ "Functions beginning with \"is\" or \"to\" and a lowercase "
+ "letter may be added to <ctype.h>. (ISO99:7.26.2)",
+ name),
+ uentry_whereLast (ue));
+
+ DPRINTF (("Externally visible: %s / %s",
+ uentry_unparseFull (ue),
+ bool_unparse (uentry_isVisibleExternally (ue))));
+ }
+
+
+ /*
+ ** 4.13.4 Mathematics <math.h>
+ **
+ ** The names of all existing functions declared in the <math.h> header,
+ ** suffixed with f or l...
+ */
+
+ DPRINTF (("Check name: %s", name));
+
+ if ((cstring_lastChar (name) == 'f' || cstring_lastChar (name) == 'l')
+ &&
+ (((length == 4)
+ && ((cstring_equalPrefixLit (name, "cos") ||
+ cstring_equalPrefixLit (name, "sin") ||
+ cstring_equalPrefixLit (name, "tan") ||
+ cstring_equalPrefixLit (name, "exp") ||
+ cstring_equalPrefixLit (name, "log") ||
+ cstring_equalPrefixLit (name, "pow"))))
+ || ((length == 5)
+ && ((cstring_equalPrefixLit (name, "acos") ||
+ cstring_equalPrefixLit (name, "asin") ||
+ cstring_equalPrefixLit (name, "atan") ||
+ cstring_equalPrefixLit (name, "cosh") ||
+ cstring_equalPrefixLit (name, "sinh") ||
+ cstring_equalPrefixLit (name, "sqrt") ||
+ cstring_equalPrefixLit (name, "ceil") ||
+ cstring_equalPrefixLit (name, "fabs") ||
+ cstring_equalPrefixLit (name, "fmod") ||
+ cstring_equalPrefixLit (name, "tanh") ||
+ cstring_equalPrefixLit (name, "modf"))))
+ || ((length == 6)
+ && ((cstring_equalPrefixLit (name, "atan2") ||
+ cstring_equalPrefixLit (name, "floor") ||
+ cstring_equalPrefixLit (name, "frexp") ||
+ cstring_equalPrefixLit (name, "ldexp") ||
+ cstring_equalPrefixLit (name, "log10"))))))
+ {
+ hasError |= optgenerror2
+ (flg, FLG_NAMECHECKS,
+ message
+ ("Name %s is reserved for future library extensions. "
+ "The names of all existing functions in <math.h> suffixed "
+ "with 'f' or 'l' may be added to <math.h>. (ISO:7.26.1)",
+ name),
+ uentry_whereLast (ue));
+ }
+
+ /*
+ ** 4.13.6 Input/Output <stdio.h>
+ **
+ ** (nothing to check)
+ */
+
+ /*
+ ** 4.13.7 General Utilities <stdlib.h>
+ **
+ ** Functions names that begin with str and a lowercase letter may be added to <stdlib.h>.
+ */
+
+ if (fchar == 's' && schar == 't' && tchar == 'r'
+ && (islower ((int) rchar)))
+ {
+ hasError |= optgenerror2
+ (flg, FLG_NAMECHECKS,
+ message
+ ("Name %s is reserved for future library extensions. "
+ "Functions that begin with \"str\" and a lowercase letter "
+ "may be added to <stdlib.h> or <string.h>. (ISO99:7.26.9)",
+ name),
+ uentry_whereLast (ue));
+ }
+
+ /*
+ ** 4.13.8 String Handling <string.h>
+ **
+ ** Function names that begin with str, mem, or wcs and a lowercase letter ...
+ **
+ ** (Note: already checked "str" above.)
+ */
+
+ if (((fchar == 'm' && schar == 'e' && tchar == 'm')
+ || (fchar == 'w' && schar == 'c' && tchar == 's'))
+ && (islower ((int) rchar)))
+ {
+ hasError |= optgenerror2
+ (flg, FLG_NAMECHECKS,
+ message
+ ("Name %s is reserved for future library extensions. "
+ "Functions that begin with \"mem\" or \"wcs\" and a "
+ "lowercase letter letter may be added to <string.h>. (ISO:7.26.11)",
+ name),
+ uentry_whereLast (ue));
+ }