You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code which reads an object which could not have been initialized prior to being read should issue a warning. Such as:
inti=i;
inti;
intj+i+10;
inti;
if(i) {}
Tracking and warning for potentially uninitialized reads would be nice, but there would certainly be false positives. Still, if it proves reasonably simple, these should also issue a warning at high warn level:
inti;
if(cond())
i=10;
intj=i*7;
The following, however, should not issue any warning:
void*p=&p; // Valid and well-defined.
inti, k;
intj=cond();
if(j)
i=10;
if(j)
k=i+6; // Has the same condition as the initialization.elsek=42;
inti; // GDCC is not advanced enough to second-guess labels and goto usage.label: if(i) {}
The text was updated successfully, but these errors were encountered:
Code which reads an object which could not have been initialized prior to being read should issue a warning. Such as:
Tracking and warning for potentially uninitialized reads would be nice, but there would certainly be false positives. Still, if it proves reasonably simple, these should also issue a warning at high warn level:
The following, however, should not issue any warning:
The text was updated successfully, but these errors were encountered: