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++/77502] -Wzero-as-null-pointer-constant : misleading/imprecise messages


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77502

--- Comment #1 from petschy at gmail dot com ---
I found another case: initializing an array of structs:

struct X
{
        const char* p;
        int i;
};

X x[] = {
        { "hello", 0 },
        { 0, 0 }, // !
        { 0, 0 }, // !
        { 0, 0 }  // !
}; // all 3 errors marked here

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