由#pragma GCC diagnostic ignored "-Wdeprecated-declarations" 浅出

本文主要介绍了预处理指令#pragma的功能和使用方法,特别是在处理编译器警告方面的作用。通过几个在线资源链接,深入探讨了#pragma如何帮助开发者控制编译器行为,包括在GCC, LLVM和Clang等编译器中的应用。

首先, #pragma 本质上也是声明,一般常用的功能就是打注释、尤其是分段注释

但是#pragma 另外一个强大的功能就是处理编译器警告。

http://www.2cto.com/kf/201412/363139.html

http://blog.youkuaiyun.com/mamong/article/details/24542107

预处理指令#pragma 

http://baike.baidu.com/link?url=Yghuu6uZz_1IM-P0cRU_a22MJxg_x1LyNd73MJdtpLiXVPhbxXuBxbK5j4Bl6VU1rw8moj2gjIePPOP_-7R0WK

GCC ,LLVM,Clang编译器对比

http://www.360doc.com/content/13/1103/22/2036337_326421835.shtml

 

转载于:https://www.cnblogs.com/goahead-yingjun/p/4578687.html

class "NXOpen::CAM::OrientGeometry"没有成员 "CoordinateSystem“#ifndef NXOpen_CAM_ORIENTGEOMETRY_HXX_INCLUDED #define NXOpen_CAM_ORIENTGEOMETRY_HXX_INCLUDED //-------------------------------------------------------------------------- // Copyright 2024 Siemens //-------------------------------------------------------------------------- // Header for C++ interface to JA API //-------------------------------------------------------------------------- // // Source File: // CAM_OrientGeometry.ja // // Generated by: // apiwrap // // WARNING: // This file is automatically generated - do not edit by hand // #ifdef _MSC_VER #pragma once #endif #include <NXOpen/NXDeprecation.hxx> #include <vector> #include <NXOpen/NXString.hxx> #include <NXOpen/Callback.hxx> #include <NXOpen/CAM_NCGroup.hxx> #include <NXOpen/libnxopencpp_cam_exports.hxx> #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4996) #endif #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif namespace NXOpen { namespace CAM { class OrientGeometry; } namespace CAM { class NCGroup; } namespace CAM { class _OrientGeometryBuilder; class OrientGeometryImpl; /** Represents a Orient Group <br> To create or edit an instance of this class, use @link NXOpen::CAM::OrientGeomBuilder NXOpen::CAM::OrientGeomBuilder @endlink <br> <br> Created in NX7.5.0. <br> */ class NXOPENCPP_CAMEXPORT OrientGeometry : public NXOpen::CAM::NCGroup { private: OrientGeometryImpl * m_orientgeometry_impl; private: friend class _OrientGeometryBuilder; protected: OrientGeometry(); public: ~OrientGeometry(); }; } } #ifdef _MSC_VER #pragma warning(pop) #endif #ifdef __GNUC__ #ifndef NX_NO_GCC_DEPRECATION_WARNINGS #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif #endif #undef EXPORTLIBRARY #endif ”
10-23
严重性 代码 说明 项目 文件 行 禁止显示状态 错误(活动) E0020 未定义标识符 "selectedCurves" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 257 错误(活动) E0153 表达式必须具有类类型,但它具有类型 "NXOpen::Update *" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 304 错误(活动) E0020 未定义标识符 "filletRadius" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 259 错误(活动) E0140 函数调用中的参数太多 caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 427 错误(活动) E0415 不存在从 "void" 转换到 "NXOpen::Point3d" 的适当构造函数 caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 427 错误(活动) E0135 class "NXOpen::Point3d" 没有成员 "DistanceTo" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 380 错误(活动) E0135 class "NXOpen::Point3d" 没有成员 "DistanceTo" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 384 错误(活动) E0135 class "NXOpen::Point3d" 没有成员 "DistanceTo" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 388 错误(活动) E0135 class "NXOpen::Point3d" 没有成员 "DistanceTo" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 392 错误(活动) E0135 class "NXOpen::Curve" 没有成员 "ParametrizePoint" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 416 错误(活动) E0135 class "NXOpen::Curve" 没有成员 "GetLimits" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 412 错误(活动) E0135 class "NXOpen::Curve" 没有成员 "GetEndPoints" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 375 错误(活动) E0135 class "NXOpen::Curve" 没有成员 "GetEndPoints" caotudaoR D:\NXopen\BaiduSyncdisk\studio\caotudaoR\caotudaoR.cpp 376 “#ifndef NXOpen_CURVE_HXX_INCLUDED #define NXOpen_CURVE_HXX_INCLUDED //-------------------------------------------------------------------------- // Header for C++ interface to JA API //-------------------------------------------------------------------------- // // Source File: // Curve.ja // // Generated by: // apiwrap // // WARNING: // This file is automatically generated - do not edit by hand // #ifdef _MSC_VER #pragma once #endif #include <NXOpen/NXDeprecation.hxx> #include <vector> #include <NXOpen/NXString.hxx> #include <NXOpen/Callback.hxx> #include <NXOpen/Drawings_DraftingCurveInfo.hxx> #include <NXOpen/IBaseCurve.hxx> #include <NXOpen/ICurve.hxx> #include <NXOpen/INXObject.hxx> #include <NXOpen/IProfile.hxx> #include <NXOpen/SmartObject.hxx> #include <NXOpen/libnxopencpp_exports.hxx> #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4996) #endif #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif namespace NXOpen { class Curve; namespace Assemblies { class Component; } class BasePart; namespace Drawings { class DraftingCurveInfo; } class IBaseCurve; class ICurve; class INXObject; class IProfile; class SmartObject; class _CurveBuilder; class CurveImpl; /** Represents a curve. <br> This is an abstract class, and cannot be instantiated <br> <br> Created in NX3.0.0. <br> */ class NXOPENCPPEXPORT Curve : public NXOpen::SmartObject, public virtual NXOpen::ICurve, public virtual NXOpen::IProfile { private: CurveImpl * m_curve_impl; private: friend class _CurveBuilder; protected: Curve(); public: ~Curve(); /** Creates new DraftingCurveInfo object @return New DraftingCurveInfo object. Returns NULL if the input curve is not a drafting curve <br> Created in NX10.0.0. <br> <br> License requirements : None */ public: virtual NXOpen::Drawings::DraftingCurveInfo * GetDraftingCurveInfo ( ); /** Returns the length of the object @return <br> Created in NX3.0.0. <br> <br> License requirements : None */ public: virtual double GetLength ( ); /**Returns the reference state of a curve <br> Created in NX8.0.0. <br> <br> License requirements : None */ public: virtual bool IsReference ( ); }; } #ifdef _MSC_VER #pragma warning(pop) #endif #ifdef __GNUC__ #ifndef NX_NO_GCC_DEPRECATION_WARNINGS #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif #endif #undef EXPORTLIBRARY #endif ”“#ifndef NXOpen_UGMATH_HXX_INCLUDED #define NXOpen_UGMATH_HXX_INCLUDED //-------------------------------------------------------------------------- // Header for C++ interface to JA API //-------------------------------------------------------------------------- // // Source File: // ugmath.ja // // Generated by: // apiwrap // // WARNING: // This file is automatically generated - do not edit by hand // #ifdef _MSC_VER #pragma once #endif #include <NXOpen/NXDeprecation.hxx> #include <vector> #include <NXOpen/NXString.hxx> #include <NXOpen/Callback.hxx> #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4996) #endif #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif namespace NXOpen { /** Represents three-dimensional cartesian coordinates for a point <br> Created in NX3.0.0. <br> */ struct Point3d { public: /** x */ double X; public: /** y */ double Y; public: /** z */ double Z; public: Point3d() : X(), Y(), Z() { } /** Constructor for the Point3d struct. */ public: Point3d(double xInitial /** x */ , double yInitial /** y */ , double zInitial /** z */ ) : X(xInitial), Y(yInitial), Z(zInitial) { } }; /** Represents a three-dimensional vector <br> Created in NX3.0.0. <br> */ struct Vector3d { public: /** x */ double X; public: /** y */ double Y; public: /** z */ double Z; public: Vector3d() : X(), Y(), Z() { } /** Constructor for the Vector3d struct. */ public: Vector3d(double xInitial /** x */ , double yInitial /** y */ , double zInitial /** z */ ) : X(xInitial), Y(yInitial), Z(zInitial) { } }; /** Represents a 3 x 3 matrix <br> Created in NX3.0.0. <br> */ struct Matrix3x3 { public: /** xx */ double Xx; public: /** xy */ double Xy; public: /** xz */ double Xz; public: /** yx */ double Yx; public: /** yy */ double Yy; public: /** yz */ double Yz; public: /** zx */ double Zx; public: /** zy */ double Zy; public: /** zz */ double Zz; public: Matrix3x3() : Xx(), Xy(), Xz(), Yx(), Yy(), Yz(), Zx(), Zy(), Zz() { } /** Constructor for the Matrix3x3 struct. */ public: Matrix3x3(double xxInitial /** xx */ , double xyInitial /** xy */ , double xzInitial /** xz */ , double yxInitial /** yx */ , double yyInitial /** yy */ , double yzInitial /** yz */ , double zxInitial /** zx */ , double zyInitial /** zy */ , double zzInitial /** zz */ ) : Xx(xxInitial), Xy(xyInitial), Xz(xzInitial), Yx(yxInitial), Yy(yyInitial), Yz(yzInitial), Zx(zxInitial), Zy(zyInitial), Zz(zzInitial) { } }; /** Represents two-dimensional cartesian coordinates for a point <br> Created in NX6.0.0. <br> */ struct Point2d { public: /** x */ double X; public: /** y */ double Y; public: Point2d() : X(), Y() { } /** Constructor for the Point2d struct. */ public: Point2d(double xInitial /** x */ , double yInitial /** y */ ) : X(xInitial), Y(yInitial) { } }; /** Represents four-dimensional homogeneous coordinates for a point. To convert to three-dimensional cartesian coordinates, divide x, y and z by w. <br> Created in NX8.5.0. <br> */ struct Point4d { public: /** x */ double X; public: /** y */ double Y; public: /** z */ double Z; public: /** weight */double W; public: Point4d() : X(), Y(), Z(), W() { } /** Constructor for the Point4d struct. */ public: Point4d(double xInitial /** x */ , double yInitial /** y */ , double zInitial /** z */ , double wInitial /** weight */) : X(xInitial), Y(yInitial), Z(zInitial), W(wInitial) { } }; } #ifdef _MSC_VER #pragma warning(pop) #endif #ifdef __GNUC__ #ifndef NX_NO_GCC_DEPRECATION_WARNINGS #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif #endif #endif ”
09-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值