Like Tree4Likes
  • 3 Post By std10093
  • 1 Post By stevesmithx

Compiler goes into another level? :P

This is a discussion on Compiler goes into another level? :P within the General Discussions forums, part of the Community Boards category; So, one guy from my uni posted this on his facebook, He passed an int, without checking it and it ...

  1. #1
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681

    Compiler goes into another level? :P

    So, one guy from my uni posted this on his facebook,
    Name:  1459296_4983773211677_703481299_n.jpg
Views: 192
Size:  14.3 KB
    He passed an int, without checking it and it was an int coming from an wrong computation. Compiler really didn't like it.

    Had you ever got any "interesting-funny" compiler messages?
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    2,370
    I haven't encountered any personally. But it would probably brighten my day if I saw one like that myself.

  3. #3
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    Quote Originally Posted by Matticus View Post
    I haven't encountered any personally. But it would probably brighten my day if I saw one like that myself.
    For sure, it would make me smile too.
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  4. #4
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    498
    Quote Originally Posted by std10093 View Post
    So, one guy from my uni posted this on his facebook,
    Name:  1459296_4983773211677_703481299_n.jpg
Views: 192
Size:  14.3 KB
    He passed an int, without checking it and it was an int coming from an wrong computation. Compiler really didn't like it.

    Had you ever got any "interesting-funny" compiler messages?
    *That* isn't a compiler error message.

    Post made with -pedantic option at 0200 hours
    Sebastiani likes this.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,081
    I wish gcc had a sense of humor...

    And I also wish g++ had smaller error messages but alas, I am probably just bad at C++ XD

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by stevesmithx View Post
    *That* isn't a compiler error message.

    Post made with -pedantic option at 0200 hours
    Right. Rather, it's the message returned from the NSInvalidArgumentException object.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  7. #7
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    I checked back his post and he says "message from Xcode debugger". Should we "accept" it?
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 09-12-2009, 01:10 PM
  2. Replies: 2
    Last Post: 02-04-2008, 01:34 AM
  3. Level-Up
    By nickodonnell in forum Game Programming
    Replies: 7
    Last Post: 10-02-2005, 02:28 AM
  4. should I go up a level
    By algi in forum Windows Programming
    Replies: 1
    Last Post: 12-07-2004, 03:59 PM
  5. Low-Level and High-level ::: C-style And C++ Style
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 12-22-2001, 04:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21