GP2C(1)
π GP2C β bestie edition π
okay so this is a PARI manpage, and the whole thing is literally about GP2C, aka The GP to C compiler. pull up a chair, grab a boba, we're doing this π§β¨
β¨ NAME β¨
GP2C β the GP to C compiler π«Ά
πΈ SYNOPSIS πΈ
gp2c [-ghfltvydWSTGV] [-i N] [-o <file>] [-p <prefix>] [file.gp]
π DESCRIPTION π
gp2c is a program that translates GP code into C code that uses the libpari library. it literally tries to generate code that looks like the PARI source code. main character energy fr π
π user option:
-o<file>β place output in file<file>. yes bestie, your code goes here now π-gβ generate automatic garbage collection code. let the machine clean up after itself, iconic π§Ήβ¨-iNβ set the indentation level toNspaces (default2). two spaces is the vibe, but you do you π-Wβ output warning about types and global variables usage. she's keeping receipts π-Cβ generate range checking code. safety first, always π-Lβ generate#linedirective for better C compiler messages. so when the compiler yells, it yells accurately π-p<prefix>β prefix user-defined symbols by<prefix>to avoid conflict. no fighting in the group chat, periodt π«-s<suffix>β add suffix<suffix>to GP install names of functions. a lil extra on the end, we love accessories π-Sβ assume strict declarations for functions. strict but fair π
π¦ query options:
-hβ this help. hi bestie, you're welcome π«Ά-fβ dump information about functions tostderr. spill the tea, but tostderrspecifically β-lβ output the list of functions known to the compiler. the full roster, no gatekeeping π-tβ output the table of types known to the compiler. every type, accounted for β¨-vβ output version information and exit. quick lil fact check, then she's out the door π
π₯ debugging options:
-dβ increase debugging level. turn the drama up π-yβ switch parser to debug mode. the parser is now in its detective era π΅οΈββοΈ-Tβ output syntactic tree intreetoolformat. look at the tree bestie, it's giving arboreal π³-TTβ output syntactic tree inVCG/GRLformat. double T, double tree, we love a sequel π²π²-Gβ generate GP code in place of C code. don't smile. π (okay that's what it says, i'm just the messenger π)-Vβ do not clean up variables. chaotic, leaving the mess exactly where it is πfile.gpβ file to be processed, defaulting tostdin. the generated C code is output tostdoutunless option-ois used. so: no file = read fromstdin, no-o= write tostdout, simple as π
also!! see the script gp2c-run for an automated compilation process. she does the whole thing for you, no cap π
π COPYING π
Copyright 2000-2018 The PARI Group
GP2C is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. there is absolutely no warranty for GP2C. like, none. zero. not a crumb π
π AUTHOR π
Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
π SEE ALSO π
gp2c-run(1), gp2c-dbg(1), gp(1), gcc(1)
aaaand that's the whole page bestie!! this one's from the GP to C compiler crew, PARI, dated January 2005 β yeah she's vintage, and vintage is iconic πβ¨π¦
π¦ where this page comes from
- debian bookworm: pari-gp2c 0.0.13-1
- debian trixie: pari-gp2c 0.0.14-1
- fedora 43: gp2c 0.0.14-7.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2
- fedora 43: gp2c 0.0.14.1-1.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2
- fedora 44: gp2c 0.0.14.1-1.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2
- nixos 26.05: gp2c 0.0.14pl1
- nixpkgs unstable: gp2c 0.0.15
- opensuse-leap 16.0: gp2c 0.0.13-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: gp2c 0.0.13-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: gp2c 0.0.13-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: gp2c 0.0.13-bp160.1.12 Β· GPL-2.0-only
- ubuntu jammy: pari-gp2c 0.0.12-2
- ubuntu noble: pari-gp2c 0.0.13-1
- ubuntu questing: pari-gp2c 0.0.14-1
- ubuntu resolute: pari-gp2c 0.0.14pl1-1
- ubuntu stonking: pari-gp2c 0.0.14pl1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms