Q:

Listings custom font size in beamer

I have a beamer frame like this:
\documentclass{beamer}
\usepackage{listings}
\begin{document}
\begin{frame}[fragile]
  \begin{lstlisting}[basicstyle=\tiny]
  Long code
  {
    ...
  }
  \end{lstlisting}
\end{frame}
\end{document}

What I need is even smaller font than \tiny - is that somehow possible?
I've also tried this:
\documentclass{beamer}
\usepackage{listings}
\begin{document}
\begin{frame}[fragile]
  \fontsize{2pt}{0.5pt}
  \selectfont
  \begin{lstlisting}
    Long code
    {
      ...
    }
  \end{lstlisting}
\end{frame}
\end{document}

Which doesn't look good since some symbols - e.g. '{', '}', '<', '>' are larger.

A:

As you can tell from the warnings your MWE causes, some symbols are not available in 2pt font size and are substituted with symbols in 5pt. 
I'm not really sure what the purpose of such a small font is, but as a workaround you could use the smallest available font which contains your symbols (5pt) but make the slides larger to get the same ratio between frame size and font. 
The following example uses frame twice the normal size:
\documentclass{beamer}
\usepackage{listings}

\makeatletter
\setlength\beamer@paperwidth{25.60cm}
\setlength\beamer@paperheight{19.20cm}
\geometry{%
  papersize={\beamer@paperwidth,\beamer@paperheight},
  hmargin=2cm,%
  vmargin=0cm,%
  head=1cm,% might be changed later
  headsep=0pt,%
  foot=1cm% might be changed later
}
\makeatother

\AtBeginDocument{\fontsize{22pt}{24pt}\selectfont}

\begin{document}
\begin{frame}[fragile]

normal text

  \fontsize{5pt}{7pt}
  \selectfont
  \begin{lstlisting}
    Long code
    {
      ...
    }
  \end{lstlisting}
\end{frame}
\end{document}

Another approach would be to look for a font that contains all your symbols in 2pt

