Notes |
|
|
It might be worth adding the dir module to the list of files in library/Mercury.options that are compiled with --no-ansi.
OTOH, we should probably just not use -ansi at all -- IIRC, it (still) puts GCC into C90 mode (annoyingly it puts clang into C89 or GNU89 mode, which is slightly different). |
|
|
(0000743)
|
wangp
|
2014-07-14 10:26
|
|
Yes, I don't understand why dir.m hasn't required --no-ansi yet.
The bigger problem is that the non-ANSI stuff leaks into the header files generated for dir.m and ends up being included into almost everything else. That stuff should be hidden away, and only appear in `local' foreign_decls, foreign_codes, and foreign_procs marked `may_not_duplicate'. |
|
|
|
I'd perfectly happy simply to not use -ansi with GCC. (I had to disable its use with clang recently anyway.)
Another problem with it is that it affects the compilation of user foreign_procs. Most of the systems we
support these days support POSIX / C99 well enough that disabling it isn't going to be a problem.
The one major system that doesn't, Windows, already requires special treatment everywhere anyway. |
|
|
|
All that said, restricting the stuff in the dir module to appear in 'local' foreign pragmas is also a worthwhile
change IMO. |
|
|
(0000934)
|
wangp
|
2016-10-06 20:27
|
|
Fixed as part of commit 1fbcfe3 (for dir.m anyway) |
|