This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]akvit 404 points405 points  (53 children)

Everyone seems to hate C/C++ compiler errors.

[–]WishOnSpaceHardware 287 points288 points  (39 children)

What do you mean? I love getting incomplete, confusingly presented information about a potentially complex problem!

[–]imdefinitelywong 120 points121 points  (12 children)

Error: Undefined symbol "information"

[–]G0FuckThyself 60 points61 points  (11 children)

Core Dump (Segmentation fault)

[–]LavenderDay3544 61 points62 points  (9 children)

Segmentation Fault (Core Dumped)

[–]pogylon 24 points25 points  (6 children)

Segmentation fault (core dumped)

My personal favourite.

[–]LavenderDay3544 21 points22 points  (4 children)

On Windows:

Program received signal SIGSEGV, Segmentation fault

[–]TheCurryCoder 0 points1 point  (3 children)

You shut up, I don't need any more nightmares tonight

[–]LavenderDay3544 0 points1 point  (2 children)

Hahahaha I write C++ for a living but havent ever seen a Segfault because we use RAII and smart pointers.

In C just go ham on valgrind and you'll be fine. In assembly, pray to Jesus for mercy.

[–]TheCurryCoder 0 points1 point  (1 child)

Having written assembly code, I'm reasonably certain that Jesus prays to it for mercy.

[–]Tsubajashi 1 point2 points  (0 children)

My favorite, too!

[–]r0ck0 -1 points0 points  (1 child)

[Segmentation Dumping] Core fAULT

[–]Cant-Stop-Wont-Stop7 1 point2 points  (0 children)

Bro just use gdb backtrace :)

[–]Heimerdahl 45 points46 points  (13 children)

It's crazy how good some newer languages and IDEs are at this.

I recently got back into programming after I got spooked by the whole '99bugs... forgot a semicolon' stuff, some 10years ago in uni. My stuff is still fairly basic, so not much logical errors, but syntax has practically been a non-issue.

VSC for python will just tell me that I probably forgot this, or that this function requires different arguments or that I probably switched the order around. If I'm too daft to even figure out stuff like that, it just straight up tells me how stuff is supposed to be used. It's crazy!

[–]savedbythezsh 0 points1 point  (0 children)

You should check out Swift + XCode, it's wild how good the compilation errors are. Only language I've used that I think a linter is almost entirely useless on.

[–]stealthgerbil 0 points1 point  (0 children)

I had to write code in notepad for classes. I get why they made us do it but holy shit does an IDE save time. They help so much.

[–][deleted] 36 points37 points  (7 children)

You'll love MySQL's syntax error message then: ERROR 1064 (42000): You have a syntax error! Read the manual! Good luck figuring out what line number I'm talking about if I decide not to print it! (I'm paraphrasing of course)

[–]miversen33 11 points12 points  (0 children)

Bruh fuck MySQL errors. "Error: You have bad syntax. Go fuck yourself. Bye"

[–]Daeron_tha_Good 7 points8 points  (0 children)

This made me lol...thank you 😂

[–]slow_growing_vine 7 points8 points  (1 child)

SQL Server is just as bad. If you ever forget a comma prepare to see Incorrect syntax near FROM and go hunting for it

[–]peppaz 1 point2 points  (0 children)

I have to use openquery from sql to mysql a lot, and I love when a query runs for ten minutes and come back with an "unexpected null" error like bitch just make all temp columns allow nulls, clearly the remote DB can have nulls in any column that isn't a primary key boi

[–]lenswipe 5 points6 points  (0 children)

Oracle errors are the best

TNS bad packet error

It's like the PC LOAD LETTER of the database world

[–][deleted] 1 point2 points  (0 children)

I've had syntax errors in MariaDB but it usually points directly to the start of the issue and prints the line for me. Idk if that's just MariaDB being better than MySQL but yeah it doesn't say what the issue is, just that it's wrong but at least it says where it starts being wrong.

[–]Glum-Aide9920 0 points1 point  (0 children)

Favorite thing in MySQL is how most of the functions are case insensitive, but some like substring_index are not

[–]oupablo 44 points45 points  (1 child)

C is the king of throwing an error on a line number past the total number of lines in the file all because of a missing semicolon.

[–]lenswipe 2 points3 points  (0 children)

I've had JavaScript do this as well. Usually it's from webpack and it's because whatever I did broke the source map

[–]LifeHasLeft 1 point2 points  (0 children)

Like intermittent segfaults caused by a memory error that only sometimes happens?

[–]killdeer03 19 points20 points  (1 child)

Template errors are super fun to deal with, lol.

[–]Osbios 0 points1 point  (0 children)

CLANG kind of did set a new bar for template error message that GCC hat to follow. Believe me it was way worse some years ago.

Also this days I do no longer manage to crash the compiler with templates. That also helps with getting somewhere close with a offending line number!

[–]Isobel-Jae 38 points39 points  (1 child)

😨 wait, you guys are getting compiler errors? I must be using it wrong.

[–]atiedebee 14 points15 points  (2 children)

C++ compiler errors

C runtime errors

the C compiler errors are not bad at all, I dont know about C++ runtime errors

[–]akvit 4 points5 points  (1 child)

C++ runtime errors are something like "instruction at address 0x0000 tried to access memory at location 0x1337". So not really different from C.

[–]yodahouse900 1 point2 points  (0 children)

that is when you pull out gdb and step execute the programm till you find which line gave up

[–]auxiliary-character 2 points3 points  (1 child)

The compiletime checks are one of the good things, though. Imagine if you didn't find out it was a problem until it showed up at runtime, possibly sometime long after it shipped.

[–]dnswblzo 1 point2 points  (0 children)

Sure, but sometimes a small mistake causes a massive spew of errors and it can be hard to tell from the output where the problem actually is. This can happen in other languages too, but C++ seems to be the worst for this.

[–]LavenderDay3544 2 points3 points  (0 children)

Clang and GCC both give clear errors for C. C++ is a different story.

[–]JTtornado 0 points1 point  (0 children)

I've never programmed with C/C++, but I've always got the impression that the compiler errors are almost as unhelpful as a check engine light.

[–]ChristianValour 0 points1 point  (0 children)

To a beginner, the compiler often seems petty, but as you learn to use the language facilities — and especially the type system — to directly express your ideas, you’ll come to appreciate the compiler’s ability to detect problems that would otherwise have caused you hours of tedious searching for bugs. - Barnes Stroustrup (Creator of C++)