error: jump to label ‘XXXX’ [-fpermissive]
Error to Label xxxx Jump
2023-09-11 14:19:35 时间
下面的类似的源码在MSVC上能正确编译通过。但是gcc/g++上就会错:
1. if(expr)
2. goto error;
3. size_t var = 0;
4.error:
5 error_handle();
4:1: error: jump to label ‘error’ [-fpermissive]
2:35: error: from here [-fpermissive]
3:9: error: crosses initialization of ‘size_t var’
解决以上问题就是要么所有变量初始化都放在函数开头,要么所有变量就不让它初始化,写成这样:
size_t var;
var = 0;
这样错误就解决了。
reference:
http://tieba.baidu.com/p/3319980115?pid=58076852390&cid=#58076852390
相关文章
- ASP.NET Error Handling
- 报错:Sqoop2 Error message: Class not found JDBC Driver Class: com.mysql.jdbc.Driver
- FATAL ERROR: Could not find ./bin/my_print_defaults 解决方法
- Mac M1 运行PyCharm出现的问题:Error loading: /Applications/PyCharm CE.app/.../attach_x86_64.dylib
- [转]Docker报错“Dockerfile parse error line 1: FROM requires either one or three arguments”
- 解决Exception in thread main java.lang.Error Unresolved compilation problems 的一种办法
- 编译内核时报错./include/net/sch_generic.h:535:28: error: inlining failed in call to always_inline 'qdisc_pkt_len': indirect function call with a yet undetermined callee static inline unsigned int qdisc_pkt_
- 【Java】jfinal-layui:org.postgresql.util.PSQLException: ERROR: syntax error at or near "value" 位置:11
- 【HarmonyOS】【FAQ】使用hdc命令安装hap包时,出现以下错误: failed to install bundle. error: operation time out.
- Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'event read from binlog did not pass crc check; the first event
- log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log]
- hexo g报错 用的next主题 ERROR Script load failed: themes/hexo-theme-next/scripts/tags/exturl.js
- Guzzle Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON
- The incident LOST_EVENTS occured on the master. Message: error writing to the binary log, Error_code
- RUBY Error: Please update your PATH to include build tools or download the DevKit
- 【致敬未来的攻城狮计划】— 连续打卡第九天:问题解决(Usage Error:Too many arguments: R7FA2E1A92DFM)、学习RA寄存器。
- 《To prune, or not to prune:exploring the efficacy of pruning for model compression》论文笔记
- Android Error Conversion to Dalvik format failed with error 1