You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Clone the HG repository
2. Make
What is the expected output? What do you see instead?
Expected that the compiler can be built. I get an error instead
What version of the product are you using? On what operating system?
Running Ubuntu Maverick with GCC --version :
cc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
Please provide any additional information below.
$ hg clone https://anic.googlecode.com/hg/ anic
requesting all changes
adding changesets
adding manifests
adding file changes
added 723 changesets with 1862 changes to 81 files (+1 heads)
updating to branch default
60 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd anic/
$ make
anic ANI Compiler Makefile
Building version controller...
Building lexer structure generator...
Generating lexer structures...
Compiling lexer structure object...
Building parser structure generator...
Building parser table generator...
Constructing parser table...
Generating parser structures...
Stamping version...
Version stamp is 0.74.1.79894644
Building main executable...
src/types.cpp: In member function ‘TypeStatus::operator uintptr_t() const’:
src/types.cpp:1514: error: cast from ‘Type*’ to ‘unsigned int’ loses
precision
src/genner.cpp: In member function ‘std::string WordTree64::toString(unsigned
int) const’:
src/genner.cpp:220: warning: format ‘%08llX’ expects type ‘long long
unsigned int’, but argument 3 has type ‘long unsigned int’
make: *** [anic] Erreur 1
Original issue reported on code.google.com by pierr...@gmail.com on 13 Nov 2010 at 6:18
The text was updated successfully, but these errors were encountered:
The loss of precision error is identical to the build failure reported under
Mac OS X when the target platform is x86_64. The solution is the same: change
the cast from `(unsigned int)` to `(uintptr_t)`. This avoids assumptions about
pointer width.
One way to avoid the format error is to cast the argument to match the expected
type. However, since the declared type of the value is `uint64_t`, a better
solution would likely be:
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
and then use the format specifier `PRIx64`.
A patch is attached.
Original comment by jeremyw....@gmail.com on 16 Nov 2010 at 2:02
Original issue reported on code.google.com by
pierr...@gmail.com
on 13 Nov 2010 at 6:18The text was updated successfully, but these errors were encountered: