No diagnostic for C++03 ?

Hi all,

I'm not a language lawyer, but consider:

This is which was resolved wontfix.


Hi all,

I'm not a language lawyer, but consider:

#include <stdio.h>

static void PrintIt(double value)
  printf("value is %f \n", value);

template <class T>
void Function(T *value)

int main ()
  int x = 1;

  short y = 2;

  return x + y;

clang -std=c++03 -pedantic -Weverything test.cxx

gives no warning/error. C++03 seems to say that, since PrintIt()
is static, it should not be found. xlc generates an error:

  *The name lookup for "PrintIt" did not find a declaration.
  *Static declarations are not considered for a function call if the
function is not qualified.

Shouldn't clang be producing a diagnostic here?

This rule was changed by DR561:

This has status CD2, which means "CD2: A DR issue not resolved in CD1 but
included in the Final Committee Draft advanced for balloting at the March,
2010 WG21 meeting." And DR means "DR: The full Committee has approved the
item as a proposed defect report.", as opposed to "Accepted: Like a DR
except that the issue concerns the wording of the current Working Paper
rather than that of the current International Standard."

That is, issue 561 was a defect in C++03 and the committee's intent was
that the language not work that way. Our "C++03" mode is ISO C++03 plus
defect reports, so includes this bug fix to C++03.