Step 1: Use "`using namespace std`", polluting your global namespace.
Step 2: Define identifiers like "`hash`" and "`runtime_error`".
Step 3: Wait years for C++ to incorporate those identifiers.
Step 4: Watch modern compilers trip over the resulting collisions.
===================================================================
@@ -287,7 +287,7 @@ void HashSet::Clear(int new_ar)
/* the hash algorithm is from
- http://ourworld.compuserve.com/homepages/bob_jenkins/evahash.htm */
+ https://web.archive.org/web/19990218144446/http://ourworld.compuserve.com/homepages/bob_jenkins/evahash.htm */
@@ -305,7 +305,7 @@ void HashSet::Clear(int new_ar)
-unsigned long hash(const char *key, unsigned long length,
+unsigned long lparseHash(const char *key, unsigned long length,
u4 a, b, c; /* internal state */
@@ -362,9 +362,9 @@ unsigned long HashSet::FindIndex(Instanc
- ind1 = hash((char *)key, arity*4, SEED_1) % mask;
+ ind1 = lparseHash((char *)key, arity*4, SEED_1) % mask;
if (table[ind1] && !equal_item(key, table[ind1], arity))
- ind2 = (hash((char *)key, arity*4, SEED_2) % mask) + 1;
+ ind2 = (lparseHash((char *)key, arity*4, SEED_2) % mask) + 1;
===================================================================
@@ -98,6 +98,6 @@ const char *error_file_and_line(long lin
-void runtime_error(InternalFunction f, ErrorType t, long a1 = 0, long a2 = 0);
+void lparse_runtime_error(InternalFunction f, ErrorType t, long a1 = 0, long a2 = 0);
===================================================================
@@ -164,7 +164,7 @@ long int_plus(int nargs, long *args )
for (i=0; i < nargs; i++) {
if (IS_CONSTANT(args[i]))
- runtime_error(FUN_PLUS, ERR_ARGUMENT, args[i]);
+ lparse_runtime_error(FUN_PLUS, ERR_ARGUMENT, args[i]);
@@ -175,25 +175,25 @@ long int_plus(int nargs, long *args )
long int_exp(int nargs, long *args )
- runtime_error(FUN_EXP, ERR_NUMARGS, 2);
+ lparse_runtime_error(FUN_EXP, ERR_NUMARGS, 2);
if (IS_CONSTANT(args[0]))
- runtime_error(FUN_EXP, ERR_ARGUMENT, args[0]);
+ lparse_runtime_error(FUN_EXP, ERR_ARGUMENT, args[0]);
if (IS_CONSTANT(args[1]))
- runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);
+ lparse_runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);
- runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);
+ lparse_runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);