News for hackers. Stuff that matters.
Re:F() vs. F(void) in C vs. C++ by tapirl on Sunday May 12, 2019 @10:41PM (#19896072)
I found another difference between C and C++ recently. C++ compiles the code in the following post ok, but C doesn't.

https://old.reddit.com/r/C_Programming/comments/bn04w0/confu...

In short, for "typedef struct bar bar;", C views "bar" as an incomplete type, but C++ doesn't.

Re:F() vs. F(void) in C vs. C++ by dearrifling on Monday May 13, 2019 @01:01AM (#19896535)
That doesn't sound right. I think the difference is that C++ doesn't treat that as an array declaration so it doesn't require a complete type.
Re:F() vs. F(void) in C vs. C++ by tapirl on Monday May 13, 2019 @12:16PM (#19900772)
What is the root cause for the difference?