public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Add __cpp_* feature macros to C++20 entries that have those in projects/cxx_status.html
@ 2019-01-11 15:54 Jakub Jelinek
  2019-01-12 13:08 ` [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes " Jakub Jelinek
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2019-01-11 15:54 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely; +Cc: gcc-patches

Hi!

I've noticed we don't have any feature test macros in the table for C++20,
even when a couple of the features have them defined.

Ok for wwwdocs?

--- htdocs/projects/cxx-status.html.jj	2019-01-11 14:24:06.524979265 +0100
+++ htdocs/projects/cxx-status.html	2019-01-11 16:41:16.650157887 +0100
@@ -148,7 +148,7 @@
 	<a href="http://wg21.link/P0905r1">P0905R1</a><br/>
 	<a href="http://wg21.link/p1120r0">P1120R0</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_impl_three_way_comparison &gt;= 201711 </td>
     </tr>
     <tr>
       <td> Access checking on specializations </td>
@@ -220,7 +220,7 @@
       <td> Class Types in Non-Type Template Parameters </td>
       <td><a href="http://wg21.link/p0732r2">P0732R2</a></td>
       <td class="supported"> 9 </td>
-      <td> </td>
+      <td> __cpp_nontype_template_parameter_class &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Atomic Compare-and-Exchange with Padding Bits </td>
@@ -232,7 +232,7 @@
       <td> Efficient sized delete for variable sized classes </td>
       <td><a href="http://wg21.link/p0722r3">P0722R3</a></td>
       <td class="supported"> 9 </td>
-      <td> </td>
+      <td> __cpp_impl_destroying_delete &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Allowing Virtual Function Calls in Constant Expressions </td>
@@ -257,7 +257,7 @@
       <td> explicit(bool) </td>
       <td><a href="http://wg21.link/p0892r2">P0892R2</a></td>
       <td class="supported"> 9 </td>
-      <td> </td>
+      <td> __cpp_conditional_explicit &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Signed integers are two's complement </td>
@@ -269,7 +269,7 @@
       <td> char8_t </td>
       <td><a href="http://wg21.link/p0482r6">P0482R6</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_char8_t &gt;= 201811 </td>
     </tr>
     <tr>
       <td> Immediate functions (consteval) </td>

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html
  2019-01-11 15:54 [wwwdocs] Add __cpp_* feature macros to C++20 entries that have those in projects/cxx_status.html Jakub Jelinek
@ 2019-01-12 13:08 ` Jakub Jelinek
  2019-01-12 15:04   ` Gerald Pfeifer
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jakub Jelinek @ 2019-01-12 13:08 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 8751 bytes --]

Hi!

On Fri, Jan 11, 2019 at 04:54:11PM +0100, Jakub Jelinek wrote:
> I've noticed we don't have any feature test macros in the table for C++20,
> even when a couple of the features have them defined.

Here is an updated patch, that in addition to that makes 9 URLs as we now
have #cxx in gcc-9/changes.html and adds missing P0941R2 entry that clang
table has.  For that one I'm not 100% sure what to say, I've copied all the
macros from http://wg21.link/p0941r2 into two source files (attached below),
one for core language features, another one for library and tested those
with -std=c++2a with current trunk.  Compared to what the paper lists, we
have __has_cpp_attribute (carries_dependency) 0, __cpp_guaranteed_copy_elision
and __cpp_nontype_template_parameter_auto not defined.  Is that what we
want?  On the library side, __cpp_lib_any, __cpp_lib_execution,
__cpp_lib_hardware_interference_size, __cpp_lib_null_iterators,
__cpp_lib_parallel_algorithm, __cpp_lib_raw_memory_algorithms,
__cpp_lib_to_chars, __cpp_lib_uncaught_exceptions, __cpp_lib_variant
macros aren't defined (at least not in <version>) and
__cpp_lib_optional, __cpp_lib_shared_ptr_arrays, __cpp_lib_string_view
have smaller values than those in the P0941R2.
Is that the desirable state given current C++2A implementation status?

Ok for wwwdocs (or do you suggest something different for the P0941R2
imlementation status)?

--- htdocs/projects/cxx-status.html.jj	2019-01-12 12:27:22.966732519 +0100
+++ htdocs/projects/cxx-status.html	2019-01-12 13:57:47.457900425 +0100
@@ -115,7 +115,7 @@
     <tr>
       <td> Range-based for statements with initializer </td>
       <td><a href="http://wg21.link/p0614r1">P0614R1</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -127,28 +127,28 @@
     <tr>
       <td> ADL and function templates that are not visible </td>
       <td><a href="http://wg21.link/p0846r0">P0846R0</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> <code>const</code> mismatch with defaulted copy constructor </td>
       <td><a href="http://wg21.link/p0641r2">P0641R2</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Less eager instantiation of <code>constexpr</code> functions </td>
       <td><a href="http://wg21.link/p0859r0">P0859R0</a></td>
-      <td class="supported"> 5.2 (mostly)<br/>9 (P0859R0) </td>
+      <td class="supported"> 5.2 (mostly)<br/> <a href="../gcc-9/changes.html#cxx">9</a> (P0859R0) </td>
       <td> </td>
     </tr>
     <tr>
       <td> Consistent comparison (<code>operator&lt;=&gt;</code>) </td>
       <td><a href="http://wg21.link/p0515r3">P0515R3</a><br/>
-	<a href="http://wg21.link/P0905r1">P0905R1</a><br/>
+	<a href="http://wg21.link/p0905r1">P0905R1</a><br/>
 	<a href="http://wg21.link/p1120r0">P1120R0</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_impl_three_way_comparison &gt;= 201711 </td>
     </tr>
     <tr>
       <td> Access checking on specializations </td>
@@ -159,19 +159,19 @@
     <tr>
       <td> Default constructible and assignable stateless lambdas </td>
       <td><a href="http://wg21.link/p0624r2">P0624R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Lambdas in unevaluated contexts </td>
       <td><a href="http://wg21.link/p0315r4">P0315R4</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Language support for empty objects </td>
       <td><a href="http://wg21.link/p0840r2">P0840R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -195,32 +195,32 @@
     <tr>
       <td> Down with typename! </td>
       <td><a href="http://wg21.link/p0634r3">P0634R3</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Allow pack expansion in lambda init-capture </td>
       <td><a href="http://wg21.link/p0780r2">P0780R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Proposed wording for likely and unlikely attributes </td>
       <td><a href="http://wg21.link/p0479r5">P0479R5</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Deprecate implicit capture of this via [=] </td>
       <td><a href="http://wg21.link/p0806r2">P0806R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Class Types in Non-Type Template Parameters </td>
       <td><a href="http://wg21.link/p0732r2">P0732R2</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_nontype_template_parameter_class &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Atomic Compare-and-Exchange with Padding Bits </td>
@@ -231,19 +231,19 @@
     <tr>
       <td> Efficient sized delete for variable sized classes </td>
       <td><a href="http://wg21.link/p0722r3">P0722R3</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_impl_destroying_delete &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Allowing Virtual Function Calls in Constant Expressions </td>
       <td><a href="http://wg21.link/p1064r0">P1064R0</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Prohibit aggregates with user-declared constructors </td>
       <td><a href="http://wg21.link/p1008r1">P1008R1</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -256,20 +256,20 @@
     <tr>
       <td> explicit(bool) </td>
       <td><a href="http://wg21.link/p0892r2">P0892R2</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_conditional_explicit &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Signed integers are two's complement </td>
       <td><a href="http://wg21.link/p1236r1">P1236R1</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> char8_t </td>
       <td><a href="http://wg21.link/p0482r6">P0482R6</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_char8_t &gt;= 201811 </td>
     </tr>
     <tr>
       <td> Immediate functions (consteval) </td>
@@ -280,23 +280,29 @@
     <tr>
       <td> std::is_constant_evaluated </td>
       <td><a href="http://wg21.link/p0595r2">P0595R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Nested inline namespaces </td>
       <td><a href="http://wg21.link/p1094r2">P1094R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
-      <td> Relaxations of constexpr restrictions</td>
+      <td> Relaxations of constexpr restrictions </td>
       <td><a href="http://wg21.link/p1002r1">P1002R1</a><br/>
       <a href="http://wg21.link/p1327r1">P1327R1</a><br/>
       <a href="http://wg21.link/p1330r0">P1330R0</a></td>
       <td class="unsupported"> No </td>
       <td> </td>
     </tr>
+    <tr>
+      <td> Feature test macros </td>
+      <td><a href="http://wg21.link/p0941r2">P0941R2</a><br/>
+      <td class="supported"> Almost all macros defined </td>
+      <td> </td>
+    </tr>
   </table>
 
   <h2 id="cxx17">C++17 Support in GCC</h2>


	Jakub

[-- Attachment #2: p0941r2-1.C --]
[-- Type: text/plain, Size: 1999 bytes --]

bool foo[] = {
//__has_cpp_attribute (carries_dependency) >= 200809L, // is 0
__has_cpp_attribute (deprecated) >= 201309L,
__has_cpp_attribute (fallthrough) >= 201603L,
__has_cpp_attribute (likely) >= 201803L,
__has_cpp_attribute (maybe_unused) >= 201603L,
__has_cpp_attribute (no_unique_address) >= 201803L,
__has_cpp_attribute (nodiscard) >= 201603L,
__has_cpp_attribute (noreturn) >= 200809L,
__has_cpp_attribute (unlikely) >= 201803L ,
__cpp_aggregate_bases >= 201603L,
__cpp_aggregate_nsdmi >= 201304L,
__cpp_alias_templates >= 200704L,
__cpp_aligned_new >= 201606L,
__cpp_attributes >= 200809L,
__cpp_binary_literals >= 201304L,
__cpp_capture_star_this >= 201603L,
__cpp_constexpr >= 201603L,
__cpp_decltype >= 200707L,
__cpp_decltype_auto >= 201304L,
__cpp_deduction_guides >= 201703L,
__cpp_delegating_constructors >= 200604L,
__cpp_enumerator_attributes >= 201411L,
__cpp_fold_expressions >= 201603L,
__cpp_generic_lambdas >= 201304L,
// __cpp_guaranteed_copy_elision >= 201606L,
__cpp_hex_float >= 201603L,
__cpp_if_constexpr >= 201606L,
__cpp_inheriting_constructors >= 201511L,
__cpp_init_captures >= 201304L,
__cpp_initializer_lists >= 200806L,
__cpp_inline_variables >= 201606L,
__cpp_lambdas >= 200907L,
__cpp_namespace_attributes >= 201411L,
__cpp_noexcept_function_type >= 201510L,
__cpp_nontype_template_args >= 201411L,
// __cpp_nontype_template_parameter_auto >= 201606L,
__cpp_nsdmi >= 200809L,
__cpp_range_based_for >= 201603L,
__cpp_raw_strings >= 200710L,
__cpp_ref_qualifiers >= 200710L,
__cpp_return_type_deduction >= 201304L,
__cpp_rvalue_references >= 200610L,
__cpp_sized_deallocation >= 201309L,
__cpp_static_assert >= 201411L,
__cpp_structured_bindings >= 201606L,
__cpp_template_template_args >= 201611L,
__cpp_threadsafe_static_init >= 200806L,
__cpp_unicode_characters >= 200704L,
__cpp_unicode_literals >= 200710L,
__cpp_user_defined_literals >= 200809L,
__cpp_variable_templates >= 201304L,
__cpp_variadic_templates >= 200704L,
__cpp_variadic_using >= 201611L
};

[-- Attachment #3: p0941r2-2.C --]
[-- Type: text/plain, Size: 2678 bytes --]

#include <version>

bool bar[] = {
__cpp_lib_addressof_constexpr >= 201603L,
__cpp_lib_allocator_traits_is_always_equal >= 201411L,
// __cpp_lib_any >= 201606L,
__cpp_lib_apply >= 201603L,
__cpp_lib_array_constexpr >= 201603L,
__cpp_lib_as_const >= 201510L,
__cpp_lib_atomic_is_always_lock_free >= 201603L,
__cpp_lib_bool_constant >= 201505L,
__cpp_lib_boyer_moore_searcher >= 201603L,
__cpp_lib_byte >= 201603L,
__cpp_lib_chrono >= 201611L,
__cpp_lib_clamp >= 201603L,
__cpp_lib_complex_udls >= 201309L,
__cpp_lib_enable_shared_from_this >= 201603L,
__cpp_lib_exchange_function >= 201304L,
// __cpp_lib_execution >= 201603L,
__cpp_lib_filesystem >= 201703L,
__cpp_lib_gcd_lcm >= 201606L,
__cpp_lib_generic_associative_lookup >= 201304L,
// __cpp_lib_hardware_interference_size >= 201703L,
__cpp_lib_has_unique_object_representations >= 201606L,
__cpp_lib_hypot >= 201603L,
__cpp_lib_incomplete_container_elements >= 201505L,
__cpp_lib_integer_sequence >= 201304L,
__cpp_lib_integral_constant_callable >= 201304L,
__cpp_lib_invoke >= 201411L,
__cpp_lib_is_aggregate >= 201703L,
__cpp_lib_is_final >= 201402L,
__cpp_lib_is_invocable >= 201703L,
__cpp_lib_is_null_pointer >= 201309L,
__cpp_lib_is_swappable >= 201603L,
__cpp_lib_launder >= 201606L,
__cpp_lib_logical_traits >= 201510L,
__cpp_lib_make_from_tuple >= 201606L,
__cpp_lib_make_reverse_iterator >= 201402L,
__cpp_lib_make_unique >= 201304L,
__cpp_lib_map_try_emplace >= 201411L,
__cpp_lib_math_special_functions >= 201603L,
__cpp_lib_memory_resource >= 201603L,
__cpp_lib_node_extract >= 201606L,
__cpp_lib_nonmember_container_access >= 201411L,
__cpp_lib_not_fn >= 201603L,
// __cpp_lib_null_iterators >= 201304L,
// __cpp_lib_optional >= 201606L, // is 201603L
// __cpp_lib_parallel_algorithm >= 201603L,
__cpp_lib_quoted_string_io >= 201304L,
// __cpp_lib_raw_memory_algorithms >= 201606L,
__cpp_lib_result_of_sfinae >= 201210L,
__cpp_lib_robust_nonmodifying_seq_ops >= 201304L,
__cpp_lib_sample >= 201603L,
__cpp_lib_scoped_lock >= 201703L,
__cpp_lib_shared_mutex >= 201505L,
// __cpp_lib_shared_ptr_arrays >= 201611L, // is 201603L
__cpp_lib_shared_ptr_weak_type >= 201606L,
__cpp_lib_shared_timed_mutex >= 201402L,
__cpp_lib_string_udls >= 201304L,
// __cpp_lib_string_view >= 201606L, // is 201603L
// __cpp_lib_to_chars >= 201611L,
__cpp_lib_transformation_trait_aliases >= 201304L,
__cpp_lib_transparent_operators >= 201510L,
__cpp_lib_tuple_element_t >= 201402L,
__cpp_lib_tuples_by_type >= 201304L,
__cpp_lib_type_trait_variable_templates >= 201510L,
// __cpp_lib_uncaught_exceptions >= 201411L,
__cpp_lib_unordered_map_try_emplace >= 201411L,
// __cpp_lib_variant >= 201606L,
__cpp_lib_void_t >= 201411L
};

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html
  2019-01-12 13:08 ` [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes " Jakub Jelinek
@ 2019-01-12 15:04   ` Gerald Pfeifer
  2019-01-12 17:30     ` Jakub Jelinek
  2019-01-15 11:10   ` Jonathan Wakely
  2019-01-21 13:41   ` Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html) Jakub Jelinek
  2 siblings, 1 reply; 9+ messages in thread
From: Gerald Pfeifer @ 2019-01-12 15:04 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, Jonathan Wakely, gcc-patches

On Sat, 12 Jan 2019, Jakub Jelinek wrote:
> Ok for wwwdocs (or do you suggest something different for the P0941R2
> imlementation status)?

I think that was a question to Jason and Jonathan wrt contents?

Markup-wise this looks fine, and adding those links looks like a 
good idea.

Gerald

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html
  2019-01-12 15:04   ` Gerald Pfeifer
@ 2019-01-12 17:30     ` Jakub Jelinek
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Jelinek @ 2019-01-12 17:30 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jason Merrill, Jonathan Wakely, gcc-patches

On Sat, Jan 12, 2019 at 04:03:57PM +0100, Gerald Pfeifer wrote:
> On Sat, 12 Jan 2019, Jakub Jelinek wrote:
> > Ok for wwwdocs (or do you suggest something different for the P0941R2
> > imlementation status)?
> 
> I think that was a question to Jason and Jonathan wrt contents?

Yeah.

> Markup-wise this looks fine, and adding those links looks like a 
> good idea.

Thanks.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html
  2019-01-12 13:08 ` [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes " Jakub Jelinek
  2019-01-12 15:04   ` Gerald Pfeifer
@ 2019-01-15 11:10   ` Jonathan Wakely
  2019-01-21 13:41   ` Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html) Jakub Jelinek
  2 siblings, 0 replies; 9+ messages in thread
From: Jonathan Wakely @ 2019-01-15 11:10 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches

On 12/01/19 14:08 +0100, Jakub Jelinek wrote:
>Hi!
>
>On Fri, Jan 11, 2019 at 04:54:11PM +0100, Jakub Jelinek wrote:
>> I've noticed we don't have any feature test macros in the table for C++20,
>> even when a couple of the features have them defined.
>
>Here is an updated patch, that in addition to that makes 9 URLs as we now
>have #cxx in gcc-9/changes.html and adds missing P0941R2 entry that clang
>table has.  For that one I'm not 100% sure what to say, I've copied all the
>macros from http://wg21.link/p0941r2 into two source files (attached below),
>one for core language features, another one for library and tested those
>with -std=c++2a with current trunk.  Compared to what the paper lists, we
>have __has_cpp_attribute (carries_dependency) 0, __cpp_guaranteed_copy_elision
>and __cpp_nontype_template_parameter_auto not defined.  Is that what we
>want?  On the library side, __cpp_lib_any,

This is missing from <version> and has the wrong value in <any>.

>__cpp_lib_execution,

This is unimplemented (it's part of trodgers' PSTL work).

>__cpp_lib_hardware_interference_size,

Unimplemented.

>__cpp_lib_null_iterators,

This should be defined except in Debug Mode (and Debug Mode should be
fixed to support it).

>__cpp_lib_parallel_algorithm,

Unimplemened (PSTL).

>__cpp_lib_raw_memory_algorithms,

Missing from both <version> and <memory>

>__cpp_lib_to_chars,

Not fully implemented.

>__cpp_lib_uncaught_exceptions,

Only defined in <version> for !__STRICT_ANSI__.

>__cpp_lib_variant

Missing from <version> and has wrong value in <variant>.

>macros aren't defined (at least not in <version>) and
>__cpp_lib_optional,

The value is wrong, we implement the P0032 changes that bumped the
macro to 201606.

>__cpp_lib_shared_ptr_arrays, __cpp_lib_string_view

I think the value is wrong for these two.

>have smaller values than those in the P0941R2.
>Is that the desirable state given current C++2A implementation status?

I'll fix the issues above.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html)
  2019-01-12 13:08 ` [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes " Jakub Jelinek
  2019-01-12 15:04   ` Gerald Pfeifer
  2019-01-15 11:10   ` Jonathan Wakely
@ 2019-01-21 13:41   ` Jakub Jelinek
  2019-01-21 16:11     ` Jonathan Wakely
  2 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2019-01-21 13:41 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely; +Cc: gcc-patches

Hi!

On Sat, Jan 12, 2019 at 02:08:15PM +0100, Jakub Jelinek wrote:
> Here is an updated patch, that in addition to that makes 9 URLs as we now
> have #cxx in gcc-9/changes.html and adds missing P0941R2 entry that clang
> table has.  For that one I'm not 100% sure what to say, I've copied all the
> macros from http://wg21.link/p0941r2 into two source files (attached below),
> one for core language features, another one for library and tested those
> with -std=c++2a with current trunk.  Compared to what the paper lists, we
> have __has_cpp_attribute (carries_dependency) 0, __cpp_guaranteed_copy_elision
> and __cpp_nontype_template_parameter_auto not defined.  Is that what we
> want?  On the library side, __cpp_lib_any, __cpp_lib_execution,
> __cpp_lib_hardware_interference_size, __cpp_lib_null_iterators,
> __cpp_lib_parallel_algorithm, __cpp_lib_raw_memory_algorithms,
> __cpp_lib_to_chars, __cpp_lib_uncaught_exceptions, __cpp_lib_variant
> macros aren't defined (at least not in <version>) and
> __cpp_lib_optional, __cpp_lib_shared_ptr_arrays, __cpp_lib_string_view
> have smaller values than those in the P0941R2.
> Is that the desirable state given current C++2A implementation status?
> 
> Ok for wwwdocs (or do you suggest something different for the P0941R2
> imlementation status)?

I'd like to ping this patch.

Thanks.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html)
  2019-01-21 13:41   ` Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html) Jakub Jelinek
@ 2019-01-21 16:11     ` Jonathan Wakely
  2019-01-21 16:36       ` Jakub Jelinek
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Wakely @ 2019-01-21 16:11 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches

On 21/01/19 14:40 +0100, Jakub Jelinek wrote:
>Hi!
>
>On Sat, Jan 12, 2019 at 02:08:15PM +0100, Jakub Jelinek wrote:
>> Here is an updated patch, that in addition to that makes 9 URLs as we now
>> have #cxx in gcc-9/changes.html and adds missing P0941R2 entry that clang
>> table has.  For that one I'm not 100% sure what to say, I've copied all the
>> macros from http://wg21.link/p0941r2 into two source files (attached below),
>> one for core language features, another one for library and tested those
>> with -std=c++2a with current trunk.  Compared to what the paper lists, we
>> have __has_cpp_attribute (carries_dependency) 0, __cpp_guaranteed_copy_elision
>> and __cpp_nontype_template_parameter_auto not defined.  Is that what we
>> want?  On the library side, __cpp_lib_any, __cpp_lib_execution,
>> __cpp_lib_hardware_interference_size, __cpp_lib_null_iterators,
>> __cpp_lib_parallel_algorithm, __cpp_lib_raw_memory_algorithms,
>> __cpp_lib_to_chars, __cpp_lib_uncaught_exceptions, __cpp_lib_variant
>> macros aren't defined (at least not in <version>) and
>> __cpp_lib_optional, __cpp_lib_shared_ptr_arrays, __cpp_lib_string_view
>> have smaller values than those in the P0941R2.
>> Is that the desirable state given current C++2A implementation status?
>>
>> Ok for wwwdocs (or do you suggest something different for the P0941R2
>> imlementation status)?
>
>I'd like to ping this patch.

For P0941R2 I think we can just say it's supported. For the library
docs I said we support it since GCC 5.1 because that's when we started
defining feature test macros. The point of the paper is to define
macros for the features that are supported, and we've been doing that
for years. If a macro is missing, it's because we don't support the
feature yet, and that's a correct implementation of the macro!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html)
  2019-01-21 16:11     ` Jonathan Wakely
@ 2019-01-21 16:36       ` Jakub Jelinek
  2019-01-21 17:19         ` Jonathan Wakely
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2019-01-21 16:36 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Jason Merrill, gcc-patches

On Mon, Jan 21, 2019 at 04:11:04PM +0000, Jonathan Wakely wrote:
> > I'd like to ping this patch.
> 
> For P0941R2 I think we can just say it's supported. For the library
> docs I said we support it since GCC 5.1 because that's when we started
> defining feature test macros. The point of the paper is to define
> macros for the features that are supported, and we've been doing that
> for years. If a macro is missing, it's because we don't support the
> feature yet, and that's a correct implementation of the macro!

So what about saying it is supported since e.g. 5 when __has_cpp_attribute
support has been added (or 4.9 when first __cpp_* predefined macros were
added)?  Like below.
What about the rest, ok for wwwdocs?

--- htdocs/projects/cxx-status.html.jj	2019-01-14 12:18:18.792043123 +0100
+++ htdocs/projects/cxx-status.html	2019-01-21 17:34:41.345489056 +0100
@@ -115,7 +115,7 @@
     <tr>
       <td> Range-based for statements with initializer </td>
       <td><a href="http://wg21.link/p0614r1">P0614R1</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -127,28 +127,28 @@
     <tr>
       <td> ADL and function templates that are not visible </td>
       <td><a href="http://wg21.link/p0846r0">P0846R0</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> <code>const</code> mismatch with defaulted copy constructor </td>
       <td><a href="http://wg21.link/p0641r2">P0641R2</a> </td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Less eager instantiation of <code>constexpr</code> functions </td>
       <td><a href="http://wg21.link/p0859r0">P0859R0</a></td>
-      <td class="supported"> 5.2 (mostly)<br/>9 (P0859R0) </td>
+      <td class="supported"> 5.2 (mostly)<br/> <a href="../gcc-9/changes.html#cxx">9</a> (P0859R0) </td>
       <td> </td>
     </tr>
     <tr>
       <td> Consistent comparison (<code>operator&lt;=&gt;</code>) </td>
       <td><a href="http://wg21.link/p0515r3">P0515R3</a><br/>
-	<a href="http://wg21.link/P0905r1">P0905R1</a><br/>
+	<a href="http://wg21.link/p0905r1">P0905R1</a><br/>
 	<a href="http://wg21.link/p1120r0">P1120R0</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_impl_three_way_comparison &gt;= 201711 </td>
     </tr>
     <tr>
       <td> Access checking on specializations </td>
@@ -159,19 +159,19 @@
     <tr>
       <td> Default constructible and assignable stateless lambdas </td>
       <td><a href="http://wg21.link/p0624r2">P0624R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Lambdas in unevaluated contexts </td>
       <td><a href="http://wg21.link/p0315r4">P0315R4</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Language support for empty objects </td>
       <td><a href="http://wg21.link/p0840r2">P0840R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -195,32 +195,32 @@
     <tr>
       <td> Down with typename! </td>
       <td><a href="http://wg21.link/p0634r3">P0634R3</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Allow pack expansion in lambda init-capture </td>
       <td><a href="http://wg21.link/p0780r2">P0780R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Proposed wording for likely and unlikely attributes </td>
       <td><a href="http://wg21.link/p0479r5">P0479R5</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Deprecate implicit capture of this via [=] </td>
       <td><a href="http://wg21.link/p0806r2">P0806R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Class Types in Non-Type Template Parameters </td>
       <td><a href="http://wg21.link/p0732r2">P0732R2</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_nontype_template_parameter_class &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Atomic Compare-and-Exchange with Padding Bits </td>
@@ -231,19 +231,19 @@
     <tr>
       <td> Efficient sized delete for variable sized classes </td>
       <td><a href="http://wg21.link/p0722r3">P0722R3</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_impl_destroying_delete &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Allowing Virtual Function Calls in Constant Expressions </td>
       <td><a href="http://wg21.link/p1064r0">P1064R0</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Prohibit aggregates with user-declared constructors </td>
       <td><a href="http://wg21.link/p1008r1">P1008R1</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
@@ -256,20 +256,20 @@
     <tr>
       <td> explicit(bool) </td>
       <td><a href="http://wg21.link/p0892r2">P0892R2</a></td>
-      <td class="supported"> 9 </td>
-      <td> </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
+      <td> __cpp_conditional_explicit &gt;= 201806 </td>
     </tr>
     <tr>
       <td> Signed integers are two's complement </td>
       <td><a href="http://wg21.link/p1236r1">P1236R1</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> char8_t </td>
       <td><a href="http://wg21.link/p0482r6">P0482R6</a></td>
       <td class="unsupported"> No </td>
-      <td> </td>
+      <td> __cpp_char8_t &gt;= 201811 </td>
     </tr>
     <tr>
       <td> Immediate functions (consteval) </td>
@@ -280,23 +280,30 @@
     <tr>
       <td> std::is_constant_evaluated </td>
       <td><a href="http://wg21.link/p0595r2">P0595R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
       <td> Nested inline namespaces </td>
       <td><a href="http://wg21.link/p1094r2">P1094R2</a></td>
-      <td class="supported"> 9 </td>
+      <td class="supported"> <a href="../gcc-9/changes.html#cxx">9</a> </td>
       <td> </td>
     </tr>
     <tr>
-      <td> Relaxations of constexpr restrictions</td>
+      <td> Relaxations of constexpr restrictions </td>
       <td><a href="http://wg21.link/p1002r1">P1002R1</a><br/>
       <a href="http://wg21.link/p1327r1">P1327R1</a><br/>
       <a href="http://wg21.link/p1330r0">P1330R0</a></td>
       <td class="unsupported"> No </td>
       <td> </td>
     </tr>
+    <tr>
+      <td> Feature test macros </td>
+      <td><a href="http://wg21.link/p0941r2">P0941R2</a><br/>
+      <td class="supported"> <a href="../gcc-4.9/changes.html#cxx">4.9</a> (<code>__cpp_</code> macros) <br />
+        <a href="../gcc-5/changes.html#cxx">5</a> (<code>__has_cpp_attribute</code>) </td>
+      <td> </td>
+    </tr>
   </table>
 
   <h2 id="cxx17">C++17 Support in GCC</h2>


	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html)
  2019-01-21 16:36       ` Jakub Jelinek
@ 2019-01-21 17:19         ` Jonathan Wakely
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Wakely @ 2019-01-21 17:19 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches

On 21/01/19 17:36 +0100, Jakub Jelinek wrote:
>On Mon, Jan 21, 2019 at 04:11:04PM +0000, Jonathan Wakely wrote:
>> > I'd like to ping this patch.
>>
>> For P0941R2 I think we can just say it's supported. For the library
>> docs I said we support it since GCC 5.1 because that's when we started
>> defining feature test macros. The point of the paper is to define
>> macros for the features that are supported, and we've been doing that
>> for years. If a macro is missing, it's because we don't support the
>> feature yet, and that's a correct implementation of the macro!
>
>So what about saying it is supported since e.g. 5 when __has_cpp_attribute
>support has been added (or 4.9 when first __cpp_* predefined macros were
>added)?  Like below.
>What about the rest, ok for wwwdocs?

LGTM.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-21 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 15:54 [wwwdocs] Add __cpp_* feature macros to C++20 entries that have those in projects/cxx_status.html Jakub Jelinek
2019-01-12 13:08 ` [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes " Jakub Jelinek
2019-01-12 15:04   ` Gerald Pfeifer
2019-01-12 17:30     ` Jakub Jelinek
2019-01-15 11:10   ` Jonathan Wakely
2019-01-21 13:41   ` Patch ping (Re: [wwwdocs] Add __cpp_* feature macros to C++20 entries + other changes that have those in projects/cxx_status.html) Jakub Jelinek
2019-01-21 16:11     ` Jonathan Wakely
2019-01-21 16:36       ` Jakub Jelinek
2019-01-21 17:19         ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).