Question:

I was testing some code on Coliru, and I got a strange output. I went down the code and could reproduce it with this simple
piece of code:

int main()
{
π
}

The output on g++:

clang:

For instance, using just pi (without the address-of) shows the expected result:

main.cpp:3:5: error: 'pi' was not declared in this scope
pi;
^

I tried to reproduce this on my machine, using g++ 4.9.2 and on others sites but I could not.

Is this some bug on this site, some config of these compilers ?

And why only using the address-of operator (&) shows this symbol ?

Answer:

It's a bug on the site, as the compiler's output is not properly escaped. The compiler should output
π, but that's valid HTML, producing the pi symbol you see.

website:

http://stackoverflow.com/questions/28885876/compiler-showing-pi-symbol-on-error

Compiler showing 'pi' symbol on error的更多相关文章

  1. ssh升级以及ssh: symbol lookup error: ssh: undefined symbol: EVP_aes_128_ctr错误处理

    1.解压安装openssl包:(不能卸载openssl,否则会影响系统的ssl加密库文件,除非你可以做两个软连接libcryto和libssl) # tar -zxvf openssl-1.0.1.t ...

  2. mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP

    Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: ...

  3. centos perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init

    之前在安装天兔数据库监控工具lepus的时候,运行时一直报perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql. ...

  4. fastDfs V5.02 升级到 V5.08版本后,启动报错:symbol lookup error: /usr/bin/fdfs_trackerd: undefined symbol: g_current_time

    /libfastcommon-1.0.36 # ./make.sh cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o ...

  5. 由一次 symbol lookup error 引发的思考

    开发一个跨平台的项目的时候,大部分时候都是在VS下进行编码,所以也就使用了VS的解决方案来管理项目. 因为要跨平台,当时网上看scons这个工具不错,所以在linux下就使用了scons来作为编译脚本 ...

  6. ldd "symbol lookup error"问题解决

    http://www.linuxquestions.org/questions/slackware-14/symbol-lookup-error-usr-lib-libgtk-x11-2-0-so-0 ...

  7. 写动态库时遇到了symbol lookup error问题

    之前写TLPI上的代码一直是手动进行错误处理,感觉代码冗余量很大,最后还是决定使用书上的tlph_hdr.h,顺便回顾下动态库的创建/使用. 参考很久之前的一篇博客 linux上静态库和动态库的编译和 ...

  8. symbol lookup error *** , undefined symbol 错误

    在重装samba过程后遇到一些问题,使用 gdb 时产生报错: gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS2_FromE ...

  9. gpg: symbol lookup error

    今天使用sudo apt-get 安装包的时候,出现gpg错误,如下: gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undef ...

随机推荐

  1. utf-8转gb2312

    近日在对一个json串进行转码时,显示中文乱码,原因是json串编码方式为utf-8,而我程序在windows上采用的是多字节编码方式,即采用gb2312编码.这里就存在一个utf-8到gb2312的 ...

  2. Dev修改gridview 背景色

    private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventA ...

  3. 锚接口(下)——html5的history api

    概述 虽然html5的history api是H5专门用来解决记录历史记录和单页面的方法,但是很多老式的浏览器并不支持它,所以一般遇到老式的浏览器会做一个polyfill使用之前的hashchange ...

  4. python中使用双端队列解决回文问题

    双端队列:英文名字:deque (全名double-ended queue)是一种具有队列和栈性质的抽象数据类型. 双端队列中的元素可以从两端弹出,插入和删除操作限定在队列的两边进行. 双端队列可以在 ...

  5. Thymeleaf教程入门到深入1:基础介绍

    1 介绍 1.1 简介 Thymeleaf是一个用于Web和独立Java环境的模板引擎,能够处理HTML.XML.JavaScript.CSS甚至纯文本.能轻易的与Spring MVC等Web框架进行 ...

  6. [宏]__stringify

    Linux内核中有如下两个宏: #define __stringify_1(x...) #x #define __stringify(x...) __stringify_1(x) 写代码测试如下: # ...

  7. live-server 快速搭建服务

    原因: 在2018年3月2日偶然情况下听到一个大佬提起“live-server”这东西, 我就研究一下,用过的人才知道live-server多么方便... 功能: 当启动live-server服务的文 ...

  8. Java开发技术大揭底——让你认知自己技术上的缺陷,成为架构师

    一.分布式架构体系 分布式怎么来的.传统的电信.银行业,当业务量大了之后,普通服务器CPU/IO/网络到了100%,请求太慢怎么办?最直接的做法,升级硬件,反正也不缺钱,IBM小型机,大型机,采购了堆 ...

  9. 自己动手,写一个分布式系统(附c#代码示例)

    分布式系统有很多成熟的解决方案.如:微软的WCF.WCF太过于复杂,配置也麻烦.其实可以自己动手设计一个小的分布式系统.系统的原理完全在自己掌握之中,可以根据业务随机而变.这里展示远程调用最核心最基本 ...

  10. (转)eclipse上传项目到码云

    把Eclipse项目上传到码云的步骤: 1.登录码云:新建项目 2.输入项目名: 3.空项目创建成功如下图: 4.右键点击Eclipse的项目,选择“Team”—————->“Share Pro ...