RFR: build pragma error with gcc 4.4.7
mvala at redhat.com
Tue Mar 20 09:45:40 UTC 2018
On 03/20/2018 12:23 AM, Kim Barrett wrote:
> Given that there seem to be no callers of os::readdir that share the
> DIR* among multiple threads, it would seem easier to just replace the
> use of ::readdir_r with ::readdir. That seems to be the intent in the
> deprecation decision; use ::readdir, and either don't share a DIR*
> among threads, or use external locking when doing so.
> There are also problems with the patch as provided.
> (1) Since PRAGMA_DIAG_PUSH/POP do nothing in the version of gcc this
> change is being made in support of, the warning would be disabled for
> all following code in any translation unit that includes this file.
> That doesn't seem good.
> (2) The default empty definition for PRAGMA_DEPRECATED_IGNORED is
> missing. That means the macro can't be used in shared code, in which
> case having defined in (shared) compilerWarnings.hpp is questionable.
Thanks for the review, these are valid comments. I'll prepare new patch
replacing ::readdir_r with ::readdir.
Red Hat Czech
More information about the hotspot-dev