https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86910

--- Comment #6 from Steffen Schuemann <ssh at pobox dot com> ---
Yeah, I totally understand, that if the behaviour of create_directories was in
conformance to the resolution to that defect, you don't feel like changing
anything. And I definitely don't want to be pedantic. In the end, if this is,
what is wanted, I have to accept the solution. Well, I might even feel pressed
to adapt the behaviour of my own implementation to that. I guess, if I had seen
the defect report in advance, I might not even have bothered you with this,
even if I would have felt bad about that decision. But I'm really grateful,
that you did forward that question, thank you for trying.

The GCC version I was using was simply the GCC8 that my Ubuntu 18.04 virtual
machine had available. I didn't want to build my own GCC on that vm as I have
some disk space issues. Before filing the issue, I double checked against the
head of the source, to make sure it is nothing changed in a later version. I
additionally tested against the g++ on my macOS that is the 8.1.0 from
homebrew.

And just for the fun of it, I used some time to double check the source of
libc++ and compiled myself a clang-8 from HEAD to run my tests with that one
too, and it is just the other way around: create_directories fails/throws when
a file with that name exists, and create_directory doesn't. :-)
I guess there's some inconsistency too, but this is the wrong issue tracker for
that.

In the end, I vote for consistency, either the more useful way with the
postcondition, or the fixed way without. Whichever docs you use when calling
them, they should behave consistently.

Thanks again, for the help and work!

Reply via email to