Commit a4d95b97 by Jason Merrill

new

From-SVN: r19672
parent 4c7d0dff
// Build don't link:
#include <stdio.h>
#include <stdlib.h>
#define MAX 256
#define MAXSTATE 1000000
struct R {
int count;
int state1;
int state2;
};
int cmp_d(const R* a, const R* b) {
return a->count > b->count;
}
namespace CXX {
template<class T, int i1, int i2>
inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) {
::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp);
}
}
using namespace CXX;
void sort_machine() {
struct R d[MAX][MAX];
qsort<R,MAX> (d, cmp_d);
}
// Build don't link:
class A {
protected:
int aData;
};
class B : public A {
public:
virtual void func1() {
A::aData = 1;
}
};
class C : virtual public B {
public:
virtual void func1(void) {
A::aData = 2;
}
};
//Build don't link:
struct X{
void i(); // ERROR -
void i(int);
int i; // ERROR - conflict
};
// Build don't link:
struct X{
void f();
};
struct Y:X{
void f(int);
void f();
using X::f; // ERROR - conflict
}; // ERROR -
// Build don't link:
struct A{
A();
};
typedef struct {
A i;
} S;
struct B: S{
using S::S; // ERROR - no such field
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment