I agree with SB: Carlin prior to the mid-80's (more social commentary, than comedy) was absolutely hysterically funny.
Bill Cosby, prior to beginning the Cosby show, also had very funny stand-up routines.
Eddie Murphy: prior to becoming a bloated, self-righteous *******, Eddie Murphy was a comic genius.
It is really hard to say, though, for one primary reason: there are some hilarious stand-up comics who do not/did not fare well in cinema and television; and, likewise, some hilarious comics in cinema and television who do not/did not fare well in stand up. Jim Carrey, for example, is an absolutely terrible stand-up comedian; really, just horrible. Likewise for Adam Sandler, etc. In my eye, though, I tend to associate the word "comic" with "stand-up," and I think that is how it's being used here.
Most people will probably say Carlin, Pryor, Lenny Bruce and the like, and, while they are all very funny, I think these votes will be as much motivated by their historical impact as their actual comedy.