Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006439OCamlOCaml generalpublic2014-05-22 15:212014-05-30 12:27
Reporterjohnwhitington 
Assigned Toshinwell 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformMacOSOS XOS Version10.9.2
Product Version 
Target Version4.02.0+devFixed in Version4.02.0+dev 
Summary0006439: Warnings on OS X when compiling 4.02.0+beta1 (Xcode 5.1.1)
DescriptionI'm not qualified to know if these matter or not, but I report them for completeness. Note that "gcc" is clang here.

gcc -DCAML_NAME_SPACE -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o backtrace.o backtrace.c
backtrace.c:294:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
        for(j--; j >= 0; j--)
                 ~ ^ ~
1 warning generated.

gcc -c -DCAML_NAME_SPACE -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT backtrace.pic.c
backtrace.pic.c:294:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
        for(j--; j >= 0; j--)
                 ~ ^ ~

gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I../../byterun -O -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE -c mmap_unix.c
mmap_unix.c:156:10: warning: 'getpagesize' is deprecated [-Wdeprecated-declarations]
  page = getpagesize();
         ^
/usr/include/unistd.h:556:6: note: 'getpagesize' declared here
int getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L);
         ^
mmap_unix.c:192:18: warning: 'getpagesize' is deprecated [-Wdeprecated-declarations]
  uintnat page = getpagesize();
                 ^
/usr/include/unistd.h:556:6: note: 'getpagesize' declared here
int getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L);
         ^
2 warnings generated.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011557)
doligez (administrator)
2014-05-23 14:24

getpagesize has been like that for quite some time, but the backtrace.c problem looks serious.
(0011558)
jacques-henri.jourdan (manager)
2014-05-23 14:59

For backtrace.c, there is indeed a problem, that can be easily solved by replacing "uintnat j;" by "intnat j;" at line 233.
(0011585)
shinwell (developer)
2014-05-30 11:54

I agree that this fix looks correct for backtrace.c. I've committed that to 4.02 and trunk.

I'm looking at getpagesize now.
(0011586)
shinwell (developer)
2014-05-30 12:27

I've committed a change to use sysconf(_SC_PAGESIZE) rather than getpagesize(), the latter of which has I think been removed entirely as of POSIX.1-2001. Seems ok on x86-64 Linux and Mac OS X.

- Issue History
Date Modified Username Field Change
2014-05-22 15:21 johnwhitington New Issue
2014-05-23 14:24 doligez Note Added: 0011557
2014-05-23 14:24 doligez Target Version => 4.02.0+dev
2014-05-23 14:59 jacques-henri.jourdan Note Added: 0011558
2014-05-30 11:54 shinwell Note Added: 0011585
2014-05-30 11:54 shinwell Assigned To => shinwell
2014-05-30 11:54 shinwell Status new => acknowledged
2014-05-30 12:27 shinwell Note Added: 0011586
2014-05-30 12:27 shinwell Status acknowledged => resolved
2014-05-30 12:27 shinwell Fixed in Version => 4.02.0+dev
2014-05-30 12:27 shinwell Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker