[LLVMbugs] [Bug 11428] errc, io_errc and future_errc constants should really be scoped enums

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 27 06:48:31 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=11428

Elias Pipping <pipping at exherbo.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |pipping at exherbo.org
         Resolution|FIXED                       |

--- Comment #4 from Elias Pipping <pipping at exherbo.org> 2012-01-27 08:48:31 CST ---
As a result of this change(*), libc++ fails to compile for me:


+ clang++ -c -g -Os -fPIC -std=c++0x -fstrict-aliasing -Wall -Wextra -Wshadow
-Wconversion -Wnewline-eof -Wpadded -Wmissing-prototypes -Wstrict-aliasing=2
-Wstrict-overflow=4 -nostdinc++ -I../include ../src/future.cpp
../src/future.cpp:42:10: error: value of type 'std::__1::future_errc' is not
implicitly convertible to 'int'
    case future_errc::no_state:
         ^~~~~~~~~~~~~~~~~~~~~
../src/future.cpp:40:10: error: value of type 'std::__1::future_errc' is not
implicitly convertible to 'int'
    case future_errc::promise_already_satisfied:
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/future.cpp:37:10: error: value of type 'std::__1::future_errc' is not
implicitly convertible to 'int'
    case future_errc::future_already_retrieved:
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/future.cpp:34:10: error: value of type 'std::__1::future_errc' is not
implicitly convertible to 'int'
    case future_errc::broken_promise:
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.

This is on linux with clang from git.

(*) `git bisect` told me.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list