The following solution is based on TikZ. It provides a command \superimpose<overlay spec>[TikZ option for node]{node text} that draws a blue rectangle with 50 percent opacity over the complete slide and then typesets a TikZ node on top of it with the given text.
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{beramono}
\usepackage{listings}
\lstset{
basicstyle=\scriptsize\ttfamily
}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\tikzset{onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}} % \pgfkeysalso doesn't change the path
}}
\newcommand<>{\superimpose}[2][]{%
\tikz[overlay, remember picture]{%
\filldraw#3[blue!30,opacity=0.5](current page.north west) rectangle (current page.south east);
\node#3[at=(current page),#1]{#2};
}%
}
\begin{document}
\begin{frame}[fragile]{A Listing}
\lstset{language=C, gobble=4}
\begin{lstlisting}
#include <stdio.h>
int main(void) {
printf("Hello World!");
return 0;
}
\end{lstlisting}
\superimpose<2>[draw=red, fill=white]{Problem: ugly syntax}%
\end{frame}
\end{document}

listingsormintedpackage, convert the pdf output into png, then make the result as a background as tikz node. – hpesoj626 Feb 24 '13 at 16:03