Charlie Day, who is most widely known for his illiterate, glue-sniffing character on FX’s “It’s Always Sunny in Philadelphia,” has been put in the unlikely position of explaining why being pursued for a sexual liaison by a character resembling Jennifer Aniston is an unpleasant prospect. It’s not an easy job.

“Most men don’t cheat on their wives. Not all, but close,” he offers rather sheepishly. In the new comedy “Horrible Bosses,” he plays a dental hygienist to Aniston’s man-eating dentist. Entirely devoted to his fiance, Day’s character, Dale, is terrified by his boss’ blackmailing seduction. As the logic of the film goes, he and his buddies — played by Jason Sudeikis and Jason Bateman — therefore decide to kill Dale’s boss along with their own. Dark as it may seem, “Bosses,” much like “Sunny,” isn’t afraid to cover controversial topics.

“I don’t think anything is too taboo to make funny,” says Day. “Murder is a terrible thing. But set against this backdrop, with these guys that have no business trying to commit a murder going about it, then it becomes a comedy. The things aren’t inherently funny. It’s how you tell the joke.”

That’s where the overlap between “Horrible Bosses” and “It’s Always Sunny” — for which Day is also a writer and producer — lies. He has just wrapped production on the seventh season of the sitcom, which depicts the depraved lives of a group of ego-centric bottom-feeders. No topic — from abortion to cats wearing mittens — is too crooked or bizarre.

“Managing to fly under the radar enough so that we don’t lose our street cred but be a big enough hit that we’re actually a very successful show has been a really nice balance,” says Day, who also offers up spoilers for the new season, premiering in September: “One of my favorite episodes is a ‘Toddlers and Tiaras’-esque thing, a kiddie pageant episode, which is just ridiculous,” Day says. “Frank has gotten involved in pageantry. He thinks it’s grown women he’s getting involved with but it happens to be kids and he has to go through with it. It’s another great season.”