This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3] enum_flags: Fix problems and add comprehensive unit tests


On 2016-11-03 23:22, Pedro Alves wrote:
+/* The (real) enum types used in CHECK_VALID.  Their names match the
+   template parameter names of the templated defined by CHECK_VALID
+   just matching real vs template param type more obvious.  They could
+   be named differently.  */

I think something is not right with the second sentence.

+/* Invalid since each type can be converted to the other.  */
+/* GCC 4.8 incorrectly fails to compile this test with:
+ error: operands to ?: have different types ‘enum_flags<RE>’ and ‘RE’
+   Confirmed to compile/pass with gcc 4.9, 5.3 and clang 3.7.
+*/
+#if GCC_VERSION >= 4009

Does this #if enables testing with clang?

+CHECK_VALID (false, void, true ? EF () : RE ())
+CHECK_VALID (false, void, true ? RE () : EF ())
+#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]