Compiler showing 'pi' symbol on error
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的更多相关文章
- 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 ...
- 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: ...
- 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. ...
- 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 ...
- 由一次 symbol lookup error 引发的思考
开发一个跨平台的项目的时候,大部分时候都是在VS下进行编码,所以也就使用了VS的解决方案来管理项目. 因为要跨平台,当时网上看scons这个工具不错,所以在linux下就使用了scons来作为编译脚本 ...
- ldd "symbol lookup error"问题解决
http://www.linuxquestions.org/questions/slackware-14/symbol-lookup-error-usr-lib-libgtk-x11-2-0-so-0 ...
- 写动态库时遇到了symbol lookup error问题
之前写TLPI上的代码一直是手动进行错误处理,感觉代码冗余量很大,最后还是决定使用书上的tlph_hdr.h,顺便回顾下动态库的创建/使用. 参考很久之前的一篇博客 linux上静态库和动态库的编译和 ...
- symbol lookup error *** , undefined symbol 错误
在重装samba过程后遇到一些问题,使用 gdb 时产生报错: gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS2_FromE ...
- gpg: symbol lookup error
今天使用sudo apt-get 安装包的时候,出现gpg错误,如下: gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undef ...
随机推荐
- nginx unit的初探
安装介绍: https://www.oschina.net/p/nginx-unit 可以看到,unit还是很强大的,居然特么都支持go 还有python 在/etc/yum.repos.d/unit ...
- 跨域ajax问题
1. Intro 在用ajax请求时,请求的域名和所在域名不同,会出现跨域问题导致请求失败. 复杂请求: 条件: .请求方式:HEAD.GET.POST .请求头信息: Accept Accept-L ...
- 前端vue框架 脚手架
1.安装node.js最新版本2.cmd下输入 1.node -v得到版本号检测是否安装成功 版本号要在6.9以上 2.npm -v 版本号要在3.10以上3.安装脚手架 1.npm install ...
- sqrt()函数对素数判断的优化
素数是只有1和本身能整除的整数.所以在求素数的时候,要将素数与1到素数本身中间的所有整数都相除,看是否有整除的数,如果有,那肯定不是素数了.但是从算法上考虑,为了减少重复量,开平方后面的数就不用相除了 ...
- PLSQL基础知识-图片
什么是PL/SQL?
- ETL概念详解
ETL是将业务系统的数据经过抽取.清洗转换之后加载到数据仓库的过程,目的是将企业中的分散.零乱.标准不统一的数据整合到一起,为企业的决策提供分析依据. ETL是BI项目重要的一个环节. 通常情况下,在 ...
- Java 虚拟机的对象创建
堆中存储的内容:在程序运行时,动态创建的对象. 创建对象的四种方式:new,clone(浅复制),反射,反序列化. 浅复制:只能复制当前对象本身,如果当前对象(A)引用了另外的对象(B),则引用对象( ...
- markdown上下左右,跳至行尾行首,重设快捷键
概述 用markdown输入代码的时候觉得下面2件事非常不方便: (1)光标上下左右.(需要挪动手去按方向键) (2)光标跳至行尾和行首.(需要动手去按Home和End键) 为了简化,我特地更改了ST ...
- 使用node.js + json-server + mock.js 搭建本地开发mock数据服务
在开发过程中,前后端不论是否分离,接口多半是滞后于页面开发的.所以建立一个REST风格的API接口,给前端页面提供虚拟的数据,是非常有必要的.对比过多种mock工具后,我最终选择了使用 json se ...
- Windows10开发手记-Windows App Certification Kit使用教程
最近有同学通过MVP的渠道询问我Windows 10应用提交审核前是否有工具能够像win7一样做App兼容性测试,其实Windows SDK已经继承了一套优秀的App测试认证工具,这可以帮助我们快速通 ...