compiler-options

Adjust Variable Tracking Assignment Length

穿精又带淫゛_ 提交于 2020-01-01 01:17:08
问题 In a release build I'm getting the following informational warning from GCC 4.4.7. note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without Have I exceeded the variable name length supported by variable tracking assignment? If so, is there a way to adjust the supported size? 回答1: This is just a note from the compiler that the debug info for the particular function will have lower quality, because your code of function is too large/complex so variable

Access maximum template depth at compile?

拈花ヽ惹草 提交于 2019-12-24 01:49:09
问题 In a certain compilation I need to play around with the option -ftemplate-depth=N that specifies the maximum template recursion. Is it possible to access the value of the maximum template depth from the program? I am interested in gcc or clang . $ c++ -ftemplate-depth=128 main.cpp #include<iostream> int main(){ std::cout << MAX_TEMPLATE_RECURSION << std::endl; // hypothetical name } 来源: https://stackoverflow.com/questions/36227436/access-maximum-template-depth-at-compile

Proper way of compiling OpenCL applications and using available compiler options

早过忘川 提交于 2019-12-22 12:30:45
问题 I am a newbie in OpenCL stuffs. Whats is the best way to compiler an OpenCL project ? Using a supported compiler ( GCC or Clang ): When we use a compiler like gcc or clang , how do we control these options? Are they have to be set inside the source code, or, likewise the normal compilation flow we can pass them on the command line. Looking at the Khornos-Manual-1.2, there are a few options provided for cl_int clBuildProgram for optimizations. : gcc|clang -O3 -I<INCLUDES> OpenCL_app.c

Proper way of compiling OpenCL applications and using available compiler options

一曲冷凌霜 提交于 2019-12-22 12:30:37
问题 I am a newbie in OpenCL stuffs. Whats is the best way to compiler an OpenCL project ? Using a supported compiler ( GCC or Clang ): When we use a compiler like gcc or clang , how do we control these options? Are they have to be set inside the source code, or, likewise the normal compilation flow we can pass them on the command line. Looking at the Khornos-Manual-1.2, there are a few options provided for cl_int clBuildProgram for optimizations. : gcc|clang -O3 -I<INCLUDES> OpenCL_app.c

What is the difference between “Create Precompiled Header” (/Yc) and “Use Precompiled Header” (/Yu) in Visual Studio?

冷暖自知 提交于 2019-12-18 12:54:38
问题 I read the documentation in MSDN, but in the end I didn't get a clear idea what is the practical difference between them, exactly. Both seem to require stdafx.h to be added at the top of every *.cpp file. I'm using VS2008. Can anyone help clear things up? 回答1: Well, I think that you must first understand the purpose of precompiled headers. In large projects, it can take ages to process all the headers required by a single client extension for example, so some people prefer to distribute the

Compiler failing on C++11 instructions in a Visual Studio project configured with cmake

无人久伴 提交于 2019-12-13 19:17:08
问题 I am trying to build the voxelterrain library (C++, Ogre) on a 64 bit Windows Machine with Visual Studio 2012. CMake seems to run without an error (see output below). When I try to compile the library I receive several errors. I have no idea about CMAKE but I assume that the compiler is not interpreting C++11 correctly. For example: this code ... template <class T> using weakPointer = std::weak_ptr<T>; gives this error: error C2988: Unerkannte Vorlagendeklaration/-definition error C2059:

Why doesn't {$ifopt FINITEFLOAT ON} compile?

妖精的绣舞 提交于 2019-12-12 08:46:30
问题 I have the construct: {$ifopt FINITEFLOAT ON} {$message 'FINITEFLOAT option ON' } {$else } {$message 'FINITEFLOAT option OFF' } {$endif } in my source and it won't compile! It's got to be something stupid. The error is: E1030 Invalid compiler directive: '$IFOPT' at the first line, but it is the FINITEFLOAT it's complaining about. You don't seem to be able to specify anything except the single letter directives like R+ etc as the argument of IFOPT. Am I missing something here? 回答1: You are

How to disable narrowing conversion warnings?

时光毁灭记忆、已成空白 提交于 2019-12-10 12:10:56
问题 I use -Wall and updating to new gcc I have got a lot of warning: narrowing conversion . I want to disable them, but leave all other warnings untouched (ideally). I can find nothing about narrowing in http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html How to disable narrowing conversion warnings? Is it possible at all? P.S. I need to Disable warnings, not fix them in the source code. Blind -Wno-conversion doesn't help. 回答1: As gx_ said, adding -Wno-narrowing to your command line should

Supressing PDB generation from the command line - C++

£可爱£侵袭症+ 提交于 2019-12-08 02:27:40
问题 I've had a search around and can find a few examples of using Visual Studio menus to suppress creation of PDB files. I need to do this for a project I'm building, however, this requires using the Visual Studio compiler from the command line only. Is there a command line switch for disabling PDB generation? 回答1: When you navigate through project settings in Visual Studio, most options tell you what their equivalent command-line switch is. To disable link-time PDB generation, omit the /DEBUG

How do I find the latest Typescript target support for any version of node?

自作多情 提交于 2019-12-07 09:33:36
问题 Assuming any version of Node, how do I find the corresponding Typescript Compiler Option for target that gives most the functionality? I want to remove the guest work. Specify ECMAScript target version: "ES3" (default), "ES5", "ES6"/"ES2015", "ES2016", "ES2017" or "ESNext". I run different versions of node, and I want to know when is the minimum node version to enable the different TSC targets. 回答1: One method to accomplish this is to check out the site http://node.green. Find your version of