[Bug c++/33501] New: Copy constructor assumed to exist for undefined class
t: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ciobi at inbox dot com GCC build triplet: x86_64-suse-linux GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33501
[Bug c/37648] New: Incorrect warning "flag ignored with precision" in printf
Consider this program: -- a.c #include int main() { int a = 10; printf("%d\n", a); printf("%0.4d\n", a); return 0; } --- By compiling with: gcc -Wall a.c This warning gets displayed: a.c:7: warning: '0' flag ignored with precision and %d printf format The '0' flag isn't actually ignored, and it shouldn't be anyway, so I think the warning is incorrect. == More details: I found this on 4.2.1, but I also tried it on 4.1.0 and 4.3.1, and the result is the same. Both gcc and g++ show the warning (initially I found this in a C++ project and then I checked to see if C code exhibits the same issue). -- Summary: Incorrect warning "flag ignored with precision" in printf Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ciobi at inbox dot com GCC build triplet: x86_64-suse-linux GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37648
[Bug c/37648] Incorrect warning "flag ignored with precision" in printf
--- Comment #2 from ciobi at inbox dot com 2008-09-29 14:30 --- Sorry. The reason I said that the '0' flag was not actually ignored was that I was sure that without it the padding would be done with spaces rather than '0'. I guess some time ago I was using a compiler where the only way to get 0-padding was with "%0.4d" ; "%.4d" produced space-padding and I'm not sure what "%04d" did, but I'm pretty sure that it wasn't what I wanted. So that's how I remembered that "it must be done". When reporting the "bug" I just assumed that "%.4d" would use space padding, and I figured that the fact that I was getting 0-padding from "%0.4d" was due to the use of 0, which now I see that is not true. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37648
[Bug c++/41427] New: variables with the same name as a "for" variable should be invalid
Consider this code: void f1() { for (int i = 0;;) int i; } void f2() { for (int i = 0;;) { int i; } } void f3() { for (int i = 0;;) { { int i; } } } Only f3() should compile, yet f1() and f2() compile too. While f1() seems wrong without giving it much thought, f2() is wrong as well, due to 6.4/3 (which seems a bit at odds with 6.5.3) I tested 4.3.3 and 4.4.0 This issue was found during a port to MSVC, and was covered here: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=489105 -- Summary: variables with the same name as a "for" variable should be invalid Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ciobi at inbox dot com GCC build triplet: x86_64-suse-linux GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41427