http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60097

            Bug ID: 60097
           Summary: spurious warning about command line option
                    "-Wno-mismatched-tags"
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dan at math dot uiuc.edu

int x;
char y;
void f () { y=x; }
/*
 compile with

     g++ -c -Wconversion -Wno-mismatched-tags

 get this:

    foo.cc: In function 'void f()':
    foo.cc:3:14: warning: conversion to 'char' from 'int' may alter its value
[-Wconversion]
     void f () { y=x; }
          ^
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-mismatched-tags"
[enabled by default]

 the warning about -Wno-mismatched-tags is false, because it is not issued when
compiling with

    g++ -c -Wno-mismatched-tags

 info:

    happens under Mac OS X with the compiler below, and also under Ubuntu
    with an older compiler

    $ g++ -v
    Using built-in specs.
    COLLECT_GCC=g++
   
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc48/4.8.2/libexec/gcc/x86_64-apple-darwin13.0.2/4.8.2/lto-wrapper
    Target: x86_64-apple-darwin13.0.2
    Configured with: ../configure --build=x86_64-apple-darwin13.0.2
--prefix=/usr/local/Cellar/gcc48/4.8.2 --enable-languages=c,c++,objc,obj-c++
--program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4
--with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08
--with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011
--with-system-zlib --enable-version-specific-runtime-libs
--enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release
--enable-lto --disable-werror --enable-plugin --disable-nls --disable-multilib
    Thread model: posix
    gcc version 4.8.2 (GCC) 

 */

Reply via email to