According to man man, you can optionally give the section of the manual before the page. Section 1 is user commands, 2 system calls and 3 library functions, so:

man 1 printf
man 3 printf

give the shell command and the C library function printf, respectively.

Answer from thiton on Stack Overflow
๐ŸŒ
Linux Man Pages
linux.die.net โ€บ man โ€บ 1 โ€บ gcc
gcc(1): GNU project C/C++ compiler - Linux man page
( NOTE: This manual does not describe the Objective-C and Objective-C ++ languages themselves. See ยท This section describes the command-line options that are only meaningful for Objective-C and Objective-C ++ programs, but you can also use most of the language-independent GNU compiler options. For example, you might compile a file "some_class.m" like this: gcc -g -fgnu-runtime -O -c some_class.mIn this example, -fgnu-runtime is an option meant only for Objective-C and Objective-C ++ programs; you can use the other options with any language supported by GCC .
๐ŸŒ
Linux Man Pages
man7.org โ€บ linux โ€บ man-pages โ€บ man1 โ€บ gcc.1.html
gcc(1) - Linux manual page
gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn...] [-Wpedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] [@file] infile... Only the most useful options are listed here; see below for the remainder.
๐ŸŒ
GNU
gcc.gnu.org โ€บ onlinedocs
GCC online documentation - GNU Project
These are manuals for the latest full releases. ... GCC 15.2 Standard C++ Library Reference Manual (also in PDF or XML GPL or XML GFDL or an HTML tarball)
๐ŸŒ
GNU
gcc.gnu.org โ€บ onlinedocs โ€บ gccint โ€บ Man-Page-Generation.html
Man Page Generation (GNU Compiler Collection (GCC) Internals)
Magic comments in Texinfo files starting โ€˜@c manโ€™ control what parts of a Texinfo file go into a man page. Only a subset of Texinfo is supported by texi2pod.pl, and it may be necessary to add support for more Texinfo features to this script when generating new man pages. To improve the man page output, some special Texinfo macros are provided in doc/include/gcc-common.texi which texi2pod.pl understands:
๐ŸŒ
Linux Man Pages
linux.die.net โ€บ man โ€บ 1 โ€บ diet
diet(1): mangle gcc arguments - Linux man page
The -v option will make diet print the modified gcc command line before executing it. When passed the -Os option before the gcc argument, diet will mangle the gcc options to include the best known for-size optimization settings for the platform.
๐ŸŒ
Oracle
docs.oracle.com โ€บ cd โ€บ E86824_01 โ€บ html โ€บ E54763 โ€บ gcc-1.html
gcc - man pages section 1: User Commands
gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn...] [-Wpedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] [@file] infile... Only the most useful options are listed here; see below for the remainder.
๐ŸŒ
GNU
gcc.gnu.org โ€บ onlinedocs โ€บ gcc
Top (Using the GNU Compiler Collection (GCC))
This manual documents how to use the GNU compilers, as well as their features and incompatibilities, and how to report bugs. It corresponds to the compilers (GCC) version 16.0.1. The internals of the GNU compilers, including how to port them to new targets and some information about how to ...
Find elsewhere
๐ŸŒ
Unix.com
unix.com โ€บ unix for beginners q & a โ€บ unix for dummies questions & answers
man gcc - UNIX for Dummies Questions & Answers - Unix Linux Community
January 14, 2002 - Hi all, How can I get man page to recognize gcc when i need to look up gcc options? I tried "man gcc" but got a response "no manual entry for gcc". Thanks a bunch, Rachael
๐ŸŒ
ManKier
mankier.com โ€บ package โ€บ gcc
Package gcc - man pages | ManKier
You'll need this package in order to compile C code. ... See also: gcc-algol68, gcc-bpf-unknown-none, gcc-gcobol, gcc-gdc, gcc-gfortran, gcc-gm2, gcc-go.
๐ŸŒ
Linux Man Pages
linux.die.net โ€บ man โ€บ 1 โ€บ x86_64-linux-gnu-gcc
x86_64-linux-gnu-gcc(1) - Linux man page
When you invoke GCC , it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to stop this process at an intermediate stage. For example, the -c option says not to run the linker.
๐ŸŒ
Manpagez
manpagez.com โ€บ man โ€บ 1 โ€บ gcc-3.3
man page gcc-3.3 section 1
The default is to use the integrated cpp (inter- nal cpp) The semantics of this option will change if "cc1", "cc1plus", and "cc1obj" are merged. -traditional -traditional-cpp Formerly, these options caused GCC to attempt to emulate a pre- standard C compiler. They are now only supported with the -E switch. The preprocessor continues to support a pre-standard mode. See the GNU CPP manual for details.
๐ŸŒ
Sortix
sortix.org โ€บ man โ€บ gcc.html
gcc manual pages
View in release: current nightly ยท cpp(1) g++(1) gcc(1) gcov(1) Section 7 - Miscellaneous Information Manual
๐ŸŒ
Arch Linux Man Pages
man.archlinux.org โ€บ man โ€บ gcc.1.en
gcc(1) โ€” Arch manual pages
When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to stop this process at an intermediate stage. For example, the -c option says not to run the linker.
๐ŸŒ
Linux Command Library
linuxcommandlibrary.com โ€บ man โ€บ gcc
gcc man | Linux Command Library
Specifies the C or C++ standard to use (e.g., -std=c99, -std=c++11). -v Prints the commands executed by the compiler driver and the compiler's version. gcc (GNU Compiler Collection) is a highly optimized and widely used compiler system developed by the GNU Project...