If I compile my C or C++ code with GCC, using -std=c99 or -std=c++11 or some other proper ISO standard rather than a GNU extension - will -Wpedantic issue more warnings that I would usually get? e.g. With -W, -Wall or -Wall -Wextra?
Will -Wpedantic do anything when compiling with a non-extension -std?
599 views Asked by einpoklum At
1
There are 1 answers
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in C
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in GCC
- File refuses to compile std::erase() even if using -std=g++23
- the difference between two style of inline ASM
- Why veneer code generated by gcc for cortex-m0 seems 8-byte aligned?
- How to compile the Linux kernel with -O0 for more detailed debug?
- GMP Windows installation "configure: error: could not find a working compiler"
- Unable to run get .exe file from assembly NASM
- Problem with compiling c++ project that is running python code using Python.h -> undefined reference
- How to use a newer linker and glibc in a Kotlin/Native project?
- "Config.guess failed to determine the host type" when trying build binutils-2.7 with Cygwin
- Trying to compile GCC returns a bunch of errors
- Compiling with gcc fno-common option causes performance degradation
- On cygwin I get errors containing -lintl and -liconv when running gcc
- Constant function pointer optimization
- How to obtain mingw-w64 version 9.3.0 or older for MSYS2?
- How to fix this error in terminal while writing hello world code in VS Code on C?
Related Questions in COMPILER-WARNINGS
- Can't get IDE0130 to show up in VS2022 error list
- PKG not resolving any path directory methodsduring compilation (path join __dirname process.cwd())
- Neither -Wunused-result, nor --warn-unused-result generates warnings about unused results
- Why do I not get a warning when I print a variable without initialising a value? (CodeBlocks 20.03)
- GCC/Clang vs. MSVC: Missing Wconversion warning in template function with std::invoke
- Can I get MSVC to be less strict about "C4127: conditional expression is constant"
- Is g++ -Wdangling-reference warning justified in this case?
- How to tell clang-tidy to ignore some headers?
- GCC warning for uninitialized data seems opposite of what the standard says
- How to suppress SYSLIB0051 in a globl suppressions file
- GCC warning: how to ignore -Wswitch-default on enum
- Why Does Visual Studio Give the Warning "Relational Expression As Switch Expression"?
- Is there a GCC/Clang attribute to mark which fields in a struct that a given mutex covers?
- why does gcc have to recognize int64 as long int?
- No CS0184 warning for impossible check
Related Questions in GCC-PEDANTIC
- Why is a stray semicolon no longer detected by `-pedantic` modern compilers?
- Is it possible to use GNU extensions unless pedantic?
- What are the examples of non-ISO practices, which are not found by -pedantic?
- How to put variable as argument in system()
- Problem with downloading data - vertices of square
- how to download an unrestricted line from a file using the fread function?
- C++ g++ -pedantic warning
- Pedantic warning in use of G_DEFINE_BOXED_TYPE
- C++98 pedantic errors when using fixed width integers
- Will -Wpedantic do anything when compiling with a non-extension -std?
- -Wno-pedantic ignored on older gcc
- Ambiguous constructor taking std::reference_wrapper when compiling with -pedantic
- C program crashes when using getchar after allocating memory
- What GCC parameters do I need in addition to -std and -pedantic-errors for portability?
- Forward define struct AND type without any warnings
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?
Popular Tags
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)
Yes, using
-pedanticmakes GCC stricter. In GCC 8.2,int foo(void) { return ({3;}); }compiles without complaint using just-Wall -std=c11but gets this warning with-pedanticadded:(The feature used, statement expressions, is intended for use in macros. It is used in my example solely as proof-of-principle.)
Comparing and contrasting:
-std=gnu11, for example, requests a non-standard version of C.-std=c11requests a standard version of C. The C standard permits, and even invites, extensions, so you may still use certain GNU extensions with-std=c11.-pedanticrequests the compiler warn about certain GNU extensions and “traditional” features that it otherwise permits.The documentation also suggests GCC may be lax about certain warnings it should issue with standard C, and
-pedanticcauses it to issue all warnings required by strict ISO C.There may be additional variations; I am not an expert on GCC dialects and switches.