The First and Only Time Porky Pig Ever Swore Was in This 1939 Cartoon
As per Keith Fagan on YouTube:
A very short black-and-white cartoon was made in 1938 as part of a Warner Bros. blooper reel. It was shown on the Warner Bros. 50th Anniversary TV show. Porky is shown doing some carpentry work, pounding nails, when he smacks his thumb with the hammer. Grimacing in pain, he cries, “Oh, son of a bi-bi-, son of a bi-bi-, son of a bi-bi-bi-… gun!” He then turns to the camera and says “Ha-ha-ha! You thought I was gonna say ‘s-s-son of a bitch’, didn’t ya?!”
This short, so-called “blooper” can also be found on the Looney Tunes Golden Collection: Volume 4 of 2006, under the title Porky Pig Breakdowns of 1939 (with several versions of the clip, making it look like a true “blooper”), and on an Each Dawn I Die DVD box set, also released in 2006. Though the “blooper” was made a year before Gone with the Wind famously used the word “damn”, due to the Motion Picture Production Code the “blooper” wasn’t shown publicly until the aforementioned special, which by that point FCC regulations softened enough for the word “bitch” to be used on TV.