zhiichen / llcomp

Automatically exported from code.google.com/p/llcomp
1 stars 0 forks source link

RAND_MAX replaced #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use RAND_MAX on a code
2. Run c2cu 
3. RAND_MAX is replaced with the RAND_MAX on the compiler machine
4. Move the code to another machine
5. Run the code

What is the expected output? What do you see instead?
The results will be different, because of different values of RAND_MAX in 
different architectures.

Possible solution:

a) Preserve #define and #include instead of using a preprocessor.
b) Write our own preprocessor
c) Use const (C99?)

Original issue reported on code.google.com by namiurtf on 22 Apr 2010 at 9:53