Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following noncompliant code contains references to headers that may exist independently in various environments but can be ambiguously interpreted by a C99-compliant compiler.

Code Block
bgColor#FFcccc
langc#ffcccc
#include "Library.h"
#include <stdio.h>
#include <stdlib.h>
#include "library.h"

#include "utilities_math.h"
#include "utilities_physics.h"

#include "my_library.h"

/* Rest of program */

...

This compliant solution avoids the ambiguity by renaming the associated files to be unique under the above constraints.

Code Block
bgColor#ccccFF
lang#ccccffc
#include "Lib_main.h"
#include <stdio.h>
#include <stdlib.h>
#include "lib_2.h"

#include "util_math.h"
#include "util_physics.h"

#include "my_library.h"

/* Rest of program */

...