Is there a compiler flag that makes g++ warn on promotion? I am aware of g++ compiler flags for warning on conversion (such as -Wconversion, -Wsign-conversion), which makes sense as conversions are potentially quite dangerous, but I do not know of a similar flag for warning on promotion. I know (think?) that promotion should be harmless in general, but still, there may be some cases where I would like to be warned when unexpected promotions arise. I have been googling for that but with no success so far.
get g++ to warn on promotions
426 Views Asked by Zorglub29 At
1
There are 1 best solutions below
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in G++
- Using std::vector<> and std::shared_ptr<> should cause error
- C++ string and char* manipulation acting weird
- Seg fault when trying to compile PhantomJS from source on CentOS 7
- There is a way in gcc to get a warning when a constexpr can't be evaluated at compile time?
- GCC expected template-name before ‘<’ token error
- C++ What determines which version of C++ can run on a specific architecture (like Arduino)
- C++ unsigned long doesn't wrap around after 4294967295
- Exception not caught on -O2
- Relationship between gcc, g++, cygwin, and wingw?
- Getting unexpected "undefined reference to" errors when compiling with a static library
- SIGSEGV with std::map of pointers to template objects
- OpenGl XUbuntu 14.04 glShaderSource, glCompileShader, glCreateProgram functions not declared
- g++: error: unrecognized command line option ‘-stdlib=libstdc++’
- OpenMP support on OpenBSD
- Is it possible to merge coverage data from two executables with gcov/gcovr?
Related Questions in COMPILER-WARNINGS
- #warning this method is no longer used (Objective-C)
- Warning when trying to initialize a 2D struct array with two initializer lists
- Parameter "StrongAssemblyName" must be specified if the flag "gacinstall" is used
- Qt: Wshadow warning on nested foreach
- Best way to avoid 'control reaches end of non-void function' warning in release mode
- Compilation warning: Unchecked call to XXX as member of the raw type
- Compiler behavior and "register storage class specifier is deprecated"
- warning: assignment from incompatible pointer type for linklist array
- warning during javac compilation by ant
- Unchecked warnings are not removed with Javac @SuppressWarnings annotation
- How to make OCaml compiler report unused functions?
- Confused about SWI Prolog compiler warnings
- Pointer parameter was set but never used warning
- How to have gcc warn about conversions from uint32_t to uint64_t?
- warning C4127: conditional expression is constant
Related Questions in TYPE-PROMOTION
- Nested vectors do not follow promotion rules. Solution has a bug.
- C++ string and char promotion
- Abstracting over Dimensionality of Types
- Is addition of byte converts to int because of java language rules or because of jvm?
- g++ error message when signedness of int type doesn't match
- What is the type promotion rule for a parenthesized sub-expression?
- Why byte and short values are promoted to int when an expression is evaluated
- How to force type promotion in a variadic function wrapper?
- Preview Image is not working in Gmail annotation email
- Null check doesn't cause type promotion in Dart
- get g++ to warn on promotions
- subtract one day from a pandas dataframe date column
- Where is the source code for Java Type Promotion and how to debug it
- Strange loop with size_t
- Is byte, short, char automatically promoted in switch statement?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can always search in GNU warning options.
-Wdouble-promotion