> On 1 Jul 2026, at 12:06, Jakub Jelinek <[email protected]> wrote:
> 
> Hi!
> 
> Last night I've noticed
> ../../gcc/config/aarch64/aarch64-neon-builtins-base.h:23:11: warning: nested 
> namespace definitions only available with -std=c++17 or -std=gnu++17 
> [-Wpedantic]
> ../../gcc/config/aarch64/aarch64-neon-builtins-shapes.cc:128:11: warning: 
> nested namespace definitions only available with -std=c++17 or -std=gnu++17 
> [-Wpedantic]
> ../../gcc/config/aarch64/aarch64-neon-builtins-shapes.h:23:11: warning: 
> nested namespace definitions only available with -std=c++17 or -std=gnu++17 
> [-Wpedantic]
> warnings.  GCC 17 is still supposed to be buildable by C++14 compilers
> (including GCC 5.4).
> The following patch fixes that to use what the backend uses elsewhere.
> 
> Ok for trunk?

Ok.
Thanks,
Kyrill

> 
> 2026-07-01  Jakub Jelinek  <[email protected]>
> 
> * config/aarch64/aarch64-neon-builtins-base.h: Use
> namespace aarch64_acle { namespace functions { ... } } instead of
> C++17 namespace aarch64_acle::functions { ... }.
> * config/aarch64/aarch64-neon-builtins-shapes.h: Use
> namespace aarch64_acle { namespace shapes { ... } } instead of
> C++17 namespace aarch64_acle::shapes { ... }.
> * config/aarch64/aarch64-neon-builtins-shapes.cc: Likewise.
> 
> --- gcc/config/aarch64/aarch64-neon-builtins-base.h.jj 2026-07-01 
> 11:54:41.859878282 +0200
> +++ gcc/config/aarch64/aarch64-neon-builtins-base.h 2026-07-01 
> 11:56:58.024178295 +0200
> @@ -20,10 +20,12 @@
> #ifndef GCC_AARCH64_NEON_BUILTINS_BASE_H
> #define GCC_AARCH64_NEON_BUILTINS_BASE_H
> 
> -namespace aarch64_acle::functions {
> +namespace aarch64_acle {
> +  namespace functions {
> #define DEF_NEON_FUNCTION(NAME, ...) \
> -  extern const aarch64_acle::function_base *const NAME;
> +    extern const aarch64_acle::function_base *const NAME;
> #include "aarch64-neon-builtins.def"
> +  }
> }
> 
> #endif
> --- gcc/config/aarch64/aarch64-neon-builtins-shapes.h.jj 2026-07-01 
> 11:54:41.859878282 +0200
> +++ gcc/config/aarch64/aarch64-neon-builtins-shapes.h 2026-07-01 
> 11:56:17.710681601 +0200
> @@ -20,10 +20,12 @@
> #ifndef GCC_AARCH64_NEON_BUILTINS_SHAPES_H
> #define GCC_AARCH64_NEON_BUILTINS_SHAPES_H
> 
> -namespace aarch64_acle::shapes {
> +namespace aarch64_acle {
> +  namespace shapes {
> #define DEF_NEON_FUNCTION(NAME, TYPES, SHAPE_ARGS) \
> -  extern const aarch64_acle::function_shape *const SHAPE_NAME (NAME, TYPES);
> +    extern const aarch64_acle::function_shape *const SHAPE_NAME (NAME, 
> TYPES);
> #include "aarch64-neon-builtins.def"
> +  }
> }
> 
> #endif
> --- gcc/config/aarch64/aarch64-neon-builtins-shapes.cc.jj 2026-07-01 
> 11:54:41.859878282 +0200
> +++ gcc/config/aarch64/aarch64-neon-builtins-shapes.cc 2026-07-01 
> 11:56:45.224338097 +0200
> @@ -125,10 +125,12 @@ struct neon_shape : public function_shap
>   tree resolve (function_resolver &) const override { gcc_unreachable (); }
> };
> 
> -namespace aarch64_acle::shapes {
> +namespace aarch64_acle {
> +  namespace shapes {
> #define DEF_NEON_FUNCTION(NAME, TYPES, SHAPE_ARGS) \
> -  static constexpr const neon_shape OBJ_NAME (NAME, TYPES) SHAPE_ARGS; \
> -  const aarch64_acle::function_shape *SHAPE_NAME (NAME, TYPES) \
> -    = &OBJ_NAME (NAME, TYPES);
> +    static constexpr const neon_shape OBJ_NAME (NAME, TYPES) SHAPE_ARGS;\
> +    const aarch64_acle::function_shape *SHAPE_NAME (NAME, TYPES) \
> +      = &OBJ_NAME (NAME, TYPES);
> #include "aarch64-neon-builtins.def"
> +  }
> }
> 
> Jakub
> 

Reply via email to