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
#include<stdio.h>
int main() {
static int X = 10;
{
static bool X = false;
printf("...");
}
printf("...");
}
If you compile the code above with clang 3.4 and break at the printf() statements (gdb or lldb) then p X will always show X to be 10. The same code compiled with GCC shows X to be false in the first case and 10 in the second as expected.
The text was updated successfully, but these errors were encountered:
Same issue is true for typedef and records (struct, union, and class).
I have a fix for all these cases, in both Clang and LLVM.
I will upload it for review ASAP.
Extended Description
#include<stdio.h>
int main() {
static int X = 10;
{
static bool X = false;
printf("...");
}
printf("...");
}
If you compile the code above with clang 3.4 and break at the printf() statements (gdb or lldb) then p X will always show X to be 10. The same code compiled with GCC shows X to be false in the first case and 10 in the second as expected.
The text was updated successfully, but these errors were encountered: