So, this is code from a student of my friend…
#include <stdio.h>
int main(){
    int hours;
    int take_one_number(void);{
        scanf("%d",&hours);
    }
    int minutes;
    int take_one_number(void);{
        scanf("%d",&minutes);
    }
    int seconds;
    int take_one_number(void);{
        scanf("%d",&seconds);
    }
    int all;
    printf("%d",all=hours*3600+minutes*60+seconds);
    return all;
}
Well, it… compiles… and… uhm, works… as requested by the teacher…
My question: if I understand correctly, take_one_number here is a definition of a variable to store a function pointer. Why does neither GCC nor LLVM complain about a duplicated identifier in these definitions?
 
     
     
     
    