Thread: This is the stupiest compiler error I've ever seen

  1. #16
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    If you compile once and you do not get many errors and then suddenly you alter something and get tons....it's usually a semicolon, parentheses, bracket, brace, something spelled wrong, etc.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Also, if you use an auto-indenting editor, the line with a missing semicolon will be shown by the fact that the NEXT line is indented differently than you'd expect.

    I'm with brewbuck on "how can the compiler know which variation of many different possible mistakes you made"? It can see that clear is of void type, so shouldn't be used as math. [And it may also realize that a pointer is not a good target for multiplication, but it may also take more effort to do that, and it will ONLY fix the particular case where semicolon is missing after a function followed by a dereference to a pointer - not one of the most common mistakes, I wouldn think].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM