Skip to content

Commit

Permalink
gcc-4.6 compile fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Blechmann <tim@klingt.org>
  • Loading branch information
timblechmann committed Apr 6, 2011
1 parent ba7ab4f commit 9c208df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if (${CMAKE_COMPILER_IS_GNUCXX})
add_definitions("-ffast-math")
endif()

if (${_gcc_version} VERSION_GREATER 4.5.99)
add_definitions("-fpermissive") # boost.atomic is using a deprecated syntax
endif()

option(DSO_VISIBILITY "DSO visibility support for gcc" OFF)

if (DSO_VISIBILITY)
Expand Down
7 changes: 4 additions & 3 deletions common/strtod.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static double powersOf10[] = { /* Table giving binary powers of 10. Entry */
*/

double
sc_strtod(string, endPtr)
const char *string; /* A decimal ASCII floating-point number,
sc_strtod(
const char *string, /* A decimal ASCII floating-point number,
* optionally preceded by white space.
* Must have form "-I.FE-X", where I is the
* integer part of the mantissa, F is the
Expand All @@ -89,8 +89,9 @@ sc_strtod(string, endPtr)
* The "E" may actually be an "e". E and X
* may both be omitted (but not just one).
*/
char **endPtr; /* If non-NULL, store terminating character's
char **endPtr /* If non-NULL, store terminating character's
* address here. */
)
{
int sign, expSign = FALSE;
double fraction, dblExp, *d;
Expand Down
2 changes: 1 addition & 1 deletion lang/LangSource/PyrInterpreter3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ void DumpSimpleBackTrace(VMGlobals *g)
for (i=0; i<16; ++i) {
char str[256];
slotOneWord(&frame->method, str);
post("%s ip %d\n", str, (char*)slotRawInt(&frame->ip) - (char*)slotRawObject(&slotRawMethod(&frame->method)->code)->slots);
post("%s ip %d\n", str, (char*)slotRawPtr(&frame->ip) - (char*)slotRawObject(&slotRawMethod(&frame->method)->code)->slots);
frame = slotRawFrame(&frame->caller);
if (!frame) break;
}
Expand Down

0 comments on commit 9c208df

Please sign in to comment.