This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48414] Missing "uninitialized" warning in simple switch


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

Andy Valencia <ajv-198-093-0407 at vsta dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ajv-198-093-0407 at vsta
                   |                            |dot org

--- Comment #1 from Andy Valencia <ajv-198-093-0407 at vsta dot org> 2012-10-24 21:54:59 UTC ---
As of:
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

the following code also does not get warned about the
possibly uninitialized variable.  I'm quite sure that
gcc *used* to pick this up.

int
main(int argc, char **argv)
{
    int c;

    if (argc > 1) {
        c = 1;
    }
    return(c);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]